<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/order_list_item_bg"
    android:paddingHorizontal="12dp"
    android:paddingTop="6dp"
    android:paddingBottom="8dp">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/cl_top"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:minHeight="32dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/tv_time"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:includeFontPadding="false"
            android:textColor="@color/color_FF1D2129"
            android:textSize="11sp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            tools:text="20/12/2025" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/tv_order_status"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:fontFamily="@font/poppins_semibold"
            android:includeFontPadding="false"
            android:textSize="12sp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            tools:text="进行中"
            tools:textColor="@color/color_FFFFB836" />

        <View
            android:layout_width="match_parent"
            android:layout_height="0.5dp"
            android:background="@color/color_FFF2F3F5"
            app:layout_constraintBottom_toBottomOf="parent" />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/cl_order_info"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/cl_top">

        <com.adealink.weparty.commonui.imageview.AvatarView
            android:id="@+id/iv_avatar"
            android:layout_width="36dp"
            android:layout_height="36dp"
            android:layout_marginTop="10dp"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/tv_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            android:layout_marginEnd="40dp"
            android:ellipsize="end"
            android:fontFamily="@font/poppins_semibold"
            android:includeFontPadding="false"
            android:singleLine="true"
            android:textColor="@color/color_FF1D2129"
            android:textSize="14sp"
            app:layout_constrainedWidth="true"
            app:layout_constraintBottom_toTopOf="@id/tv_desc"
            app:layout_constraintEnd_toStartOf="@id/cl_right"
            app:layout_constraintHorizontal_bias="0"
            app:layout_constraintHorizontal_chainStyle="packed"
            app:layout_constraintStart_toEndOf="@id/iv_avatar"
            app:layout_constraintTop_toTopOf="@id/iv_avatar"
            app:layout_constraintVertical_bias="1"
            app:layout_constraintVertical_chainStyle="packed"
            tools:text="Super Beautiful Girl Super Beautiful Girl Super Beautiful Girl" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/tv_desc"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="40dp"
            android:ellipsize="end"
            android:includeFontPadding="false"
            android:singleLine="true"
            android:textColor="@color/color_FF1D2129"
            android:textSize="12sp"
            app:layout_constrainedWidth="true"
            app:layout_constraintBottom_toBottomOf="@id/iv_avatar"
            app:layout_constraintEnd_toStartOf="@id/cl_right"
            app:layout_constraintHorizontal_bias="0"
            app:layout_constraintStart_toStartOf="@id/tv_name"
            app:layout_constraintTop_toBottomOf="@id/tv_name"
            tools:text="LOL Mobile" />

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/cl_right"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:layout_constraintBottom_toBottomOf="@id/iv_avatar"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="@id/iv_avatar"
            app:layout_constraintVertical_bias="1">

            <androidx.appcompat.widget.AppCompatImageView
                android:layout_width="12.8dp"
                android:layout_height="12.8dp"
                android:layout_marginEnd="2dp"
                app:layout_constraintBottom_toBottomOf="@id/tv_price"
                app:layout_constraintEnd_toStartOf="@id/tv_price"
                app:layout_constraintTop_toTopOf="@id/tv_price"
                app:srcCompat="@drawable/common_wallet_coin_ic" />

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/tv_price"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:includeFontPadding="false"
                android:textColor="@color/color_FF1D2129"
                android:textSize="12sp"
                app:layout_constraintBottom_toTopOf="@id/tv_count"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                tools:text="16000" />

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/tv_count"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:includeFontPadding="false"
                android:textColor="@color/color_FF1D2129"
                android:textSize="11sp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toBottomOf="@id/tv_price"
                tools:text="hour x1" />

        </androidx.constraintlayout.widget.ConstraintLayout>

    </androidx.constraintlayout.widget.ConstraintLayout>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/cl_bottom"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="8dp"
        android:minHeight="40dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/cl_order_info">

        <!-- 完成订单 -->
        <com.adealink.weparty.commonui.widget.CommonButton
            android:id="@+id/btn_complete"
            android:layout_width="wrap_content"
            android:layout_height="30dp"
            android:layout_marginEnd="8dp"
            android:gravity="center"
            android:includeFontPadding="false"
            android:minWidth="80dp"
            android:paddingHorizontal="6dp"
            app:layout_constrainedWidth="true"
            app:layout_constraintBottom_toTopOf="@id/btn_cancel"
            app:layout_constraintEnd_toStartOf="@id/right_barrier"
            app:layout_constraintHorizontal_bias="0"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintVertical_chainStyle="packed"
            app:text="@string/order_btn_finish"
            app:textColor="@color/white"
            app:textSize="12sp" />

        <!-- 取消订单 -->
        <com.adealink.weparty.commonui.widget.CommonButton
            android:id="@+id/btn_cancel"
            android:layout_width="wrap_content"
            android:layout_height="30dp"
            android:layout_marginEnd="8dp"
            android:gravity="center"
            android:includeFontPadding="false"
            android:minWidth="80dp"
            android:paddingHorizontal="6dp"
            app:common_button_type="cancel"
            app:layout_constrainedWidth="true"
            app:layout_constraintBottom_toTopOf="@id/btn_evaluate"
            app:layout_constraintEnd_toStartOf="@id/right_barrier"
            app:layout_constraintHorizontal_bias="0"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/btn_complete"
            app:text="@string/commonui_cancel"
            app:textColor="@color/white"
            app:textSize="12sp" />

        <!-- 去评价 -->
        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/btn_evaluate"
            android:layout_width="wrap_content"
            android:layout_height="30dp"
            android:layout_marginEnd="8dp"
            android:background="@drawable/order_button_evaluate_bg"
            android:fontFamily="@font/poppins_semibold"
            android:gravity="center"
            android:includeFontPadding="false"
            android:minWidth="80dp"
            android:paddingHorizontal="6dp"
            android:paddingVertical="3dp"
            android:text="@string/order_btn_evaluate"
            android:textColor="@color/color_FF3FBFBD"
            android:textSize="12sp"
            app:layout_constrainedWidth="true"
            app:layout_constraintBottom_toTopOf="@id/tv_refunded"
            app:layout_constraintEnd_toStartOf="@id/right_barrier"
            app:layout_constraintHorizontal_bias="0"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/btn_cancel" />

        <!-- 退款 -->
        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/tv_refunded"
            android:layout_width="wrap_content"
            android:layout_height="30dp"
            android:layout_marginEnd="8dp"
            android:ellipsize="end"
            android:gravity="start|center_vertical"
            android:includeFontPadding="false"
            android:minWidth="80dp"
            android:paddingHorizontal="6dp"
            android:paddingVertical="3dp"
            android:singleLine="true"
            android:text="@string/order_refunded_success"
            android:textColor="@color/color_FF86909C"
            android:textSize="11sp"
            app:layout_constrainedWidth="true"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toStartOf="@id/right_barrier"
            app:layout_constraintHorizontal_bias="0"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/btn_evaluate" />

        <androidx.constraintlayout.widget.Barrier
            android:id="@+id/right_barrier"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:barrierDirection="start"
            app:constraint_referenced_ids="v_discount,tv_order_all_cost" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/v_discount"
            style="@style/CommonDiscountPriceView"
            android:layout_width="wrap_content"
            android:layout_marginEnd="4dp"
            android:text="@string/common_discount"
            android:visibility="gone"
            app:layout_constraintBottom_toBottomOf="@id/tv_order_all_cost"
            app:layout_constraintEnd_toStartOf="@id/tv_order_all_cost"
            app:layout_constraintTop_toTopOf="@id/tv_order_all_cost"
            tools:visibility="visible" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/tv_order_all_cost"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:includeFontPadding="false"
            android:textColor="@color/color_FF1D2129"
            android:textSize="12sp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            tools:text="共计: 16000" />

    </androidx.constraintlayout.widget.ConstraintLayout>

</androidx.constraintlayout.widget.ConstraintLayout>