<?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="match_parent">

    <com.adealink.weparty.commonui.widget.CommonTopBar
        android:id="@+id/top_bar"
        android:layout_width="match_parent"
        android:layout_height="@dimen/common_top_bar_height"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:top_bar_title="@string/order_detail_title" />

    <androidx.core.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:background="@color/color_FFF1F2F5"
        android:orientation="vertical"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/top_bar">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingBottom="60dp">

            <androidx.appcompat.widget.AppCompatImageView
                android:id="@+id/iv_top_bg"
                android:layout_width="0dp"
                android:layout_height="0dp"
                app:layout_constraintDimensionRatio="375:193"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:srcCompat="@drawable/order_detail_top_bg" />

            <com.adealink.weparty.commonui.widget.EvaluateView
                android:id="@+id/v_evaluate"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="35dp"
                android:visibility="gone"
                app:evaluate_current="0"
                app:evaluate_divide="12dp"
                app:evaluate_max="5"
                app:evaluate_width="30dp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                tools:evaluate_current="3"
                tools:visibility="visible" />

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/cl_order_status"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="6dp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/v_evaluate"
                app:layout_goneMarginTop="44dp">

                <androidx.appcompat.widget.AppCompatImageView
                    android:id="@+id/iv_order_status"
                    android:layout_width="24dp"
                    android:layout_height="24dp"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toStartOf="@id/tv_order_status"
                    app:layout_constraintHorizontal_chainStyle="packed"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent"
                    app:srcCompat="@drawable/order_status_finish_ic" />

                <androidx.appcompat.widget.AppCompatTextView
                    android:id="@+id/tv_order_status"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="8dp"
                    android:fontFamily="@font/poppins_semibold"
                    android:includeFontPadding="false"
                    android:textColor="@color/color_FF1D2129"
                    android:textSize="24sp"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toEndOf="@id/iv_order_status"
                    app:layout_constraintTop_toTopOf="parent"
                    tools:text="@string/order_status_finish" />
            </androidx.constraintlayout.widget.ConstraintLayout>

            <androidx.constraintlayout.widget.ConstraintLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="16dp"
                android:layout_marginTop="30dp"
                android:background="@drawable/order_detail_bg"
                android:paddingHorizontal="12dp"
                android:paddingVertical="8dp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/cl_order_status">

                <!-- 陪玩信息 -->
                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/cl_order_playmate"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    app:layout_constraintTop_toTopOf="parent">

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

                    <androidx.appcompat.widget.AppCompatTextView
                        android:id="@+id/tv_order_name"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="8dp"
                        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_toBottomOf="@id/iv_order_avatar"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintHorizontal_bias="0"
                        app:layout_constraintStart_toEndOf="@id/iv_order_avatar"
                        app:layout_constraintTop_toTopOf="@id/iv_order_avatar"
                        tools:text="UserName UserName UserName" />

                    <View
                        android:layout_width="0dp"
                        android:layout_height="1dp"
                        android:layout_marginTop="12dp"
                        android:background="@color/color_FFF2F3F5"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toBottomOf="@id/iv_order_avatar" />

                </androidx.constraintlayout.widget.ConstraintLayout>

                <!-- 产品类型 -->
                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/cl_order_product_type"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="12dp"
                    android:minHeight="30dp"
                    android:paddingVertical="6dp"
                    app:layout_constraintTop_toBottomOf="@id/cl_order_playmate">

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

                    <androidx.appcompat.widget.AppCompatTextView
                        android:id="@+id/tv_product_type_detail"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="60dp"
                        android:gravity="end"
                        android:includeFontPadding="false"
                        android:textColor="@color/color_FF1D2129"
                        android:textSize="12sp"
                        app:layout_constrainedWidth="true"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintHorizontal_bias="1"
                        app:layout_constraintStart_toEndOf="@id/tv_product_type"
                        app:layout_constraintTop_toTopOf="parent"
                        tools:text="LOL Mobile" />

                </androidx.constraintlayout.widget.ConstraintLayout>

                <!-- 购买数量 -->
                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/cl_order_count"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:minHeight="30dp"
                    android:paddingVertical="6dp"
                    app:layout_constraintTop_toBottomOf="@id/cl_order_product_type">

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

                    <androidx.appcompat.widget.AppCompatTextView
                        android:id="@+id/tv_order_count_detail"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="60dp"
                        android:gravity="end"
                        android:includeFontPadding="false"
                        android:textColor="@color/color_FF1D2129"
                        android:textSize="12sp"
                        app:layout_constrainedWidth="true"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintHorizontal_bias="1"
                        app:layout_constraintStart_toEndOf="@id/tv_order_count"
                        app:layout_constraintTop_toTopOf="parent"
                        tools:text="1" />

                </androidx.constraintlayout.widget.ConstraintLayout>

                <!-- 订单编号 -->
                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/cl_order_id"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:minHeight="30dp"
                    android:paddingVertical="6dp"
                    app:layout_constraintTop_toBottomOf="@id/cl_order_count">

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

                    <androidx.appcompat.widget.AppCompatTextView
                        android:id="@+id/tv_order_id_detail"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="60dp"
                        android:gravity="end"
                        android:includeFontPadding="false"
                        android:textColor="@color/color_FF1D2129"
                        android:textSize="12sp"
                        app:layout_constrainedWidth="true"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintHorizontal_bias="1"
                        app:layout_constraintStart_toEndOf="@id/tv_order_id"
                        app:layout_constraintTop_toTopOf="parent"
                        tools:text="No.12345677777777123456777777771234567777777712345677777777" />

                </androidx.constraintlayout.widget.ConstraintLayout>

                <!-- 购买时间 -->
                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/cl_order_time"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:minHeight="30dp"
                    android:paddingVertical="6dp"
                    app:layout_constraintTop_toBottomOf="@id/cl_order_id">

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

                    <androidx.appcompat.widget.AppCompatTextView
                        android:id="@+id/tv_order_time_detail"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="60dp"
                        android:gravity="end"
                        android:includeFontPadding="false"
                        android:textColor="@color/color_FF1D2129"
                        android:textSize="12sp"
                        app:layout_constrainedWidth="true"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintHorizontal_bias="1"
                        app:layout_constraintStart_toEndOf="@id/tv_order_time"
                        app:layout_constraintTop_toTopOf="parent"
                        tools:text="2025/10/20 14:34:00" />

                </androidx.constraintlayout.widget.ConstraintLayout>


                <View
                    android:layout_width="0dp"
                    android:layout_height="1dp"
                    android:layout_marginTop="12dp"
                    android:background="@color/color_FFF2F3F5"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@id/cl_order_time" />


                <!-- 总金额 -->
                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/cl_order_cost"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="24dp"
                    android:minHeight="30dp"
                    android:paddingVertical="6dp"
                    app:layout_constraintTop_toBottomOf="@id/cl_order_time">

                    <androidx.appcompat.widget.AppCompatTextView
                        android:id="@+id/tv_order_cost_detail"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="60dp"
                        android:gravity="end"
                        android:includeFontPadding="false"
                        android:textColor="@color/color_FF1D2129"
                        android:textSize="12sp"
                        app:layout_constrainedWidth="true"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintHorizontal_bias="1"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent"
                        tools:text="共计16000" />

                </androidx.constraintlayout.widget.ConstraintLayout>

            </androidx.constraintlayout.widget.ConstraintLayout>


        </androidx.constraintlayout.widget.ConstraintLayout>


    </androidx.core.widget.NestedScrollView>

    <!-- 订单进行中 -->
    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/cl_order_in_progress"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:visibility="gone"
        app:layout_constraintBottom_toTopOf="@id/cl_order_finish"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintVertical_chainStyle="packed"
        tools:visibility="visible">

        <!-- 退款 -->
        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/btn_refund"
            android:layout_width="0dp"
            android:layout_height="48dp"
            android:layout_marginStart="16dp"
            android:layout_marginEnd="10dp"
            android:background="@drawable/order_button_refund_bg"
            android:fontFamily="@font/poppins_semibold"
            android:gravity="center"
            android:includeFontPadding="false"
            android:minWidth="60dp"
            android:paddingHorizontal="6dp"
            android:paddingVertical="3dp"
            android:text="@string/order_btn_refund"
            android:textColor="@color/color_FF86909C"
            android:textSize="16sp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toStartOf="@id/btn_finish"
            app:layout_constraintHorizontal_weight="14"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <!-- 完成订单 -->
        <com.adealink.weparty.commonui.widget.CommonButton
            android:id="@+id/btn_finish"
            android:layout_width="0dp"
            android:layout_height="48dp"
            android:layout_marginEnd="16dp"
            android:fontFamily="@font/poppins_semibold"
            android:gravity="center"
            android:includeFontPadding="false"
            android:minWidth="60dp"
            android:paddingHorizontal="6dp"
            android:paddingVertical="3dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_weight="18"
            app:layout_constraintStart_toEndOf="@id/btn_refund"
            app:layout_constraintTop_toTopOf="parent"
            app:text="@string/order_btn_finish"
            app:textColor="@color/white"
            app:textSize="16sp" />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <!-- 订单已完成 -->
    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/cl_order_finish"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        tools:visibility="visible">

        <!-- 去评价 -->
        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/btn_evaluate"
            android:layout_width="0dp"
            android:layout_height="48dp"
            android:layout_marginHorizontal="16dp"
            android:background="@drawable/order_button_evaluate_bg"
            android:fontFamily="@font/poppins_semibold"
            android:gravity="center"
            android:includeFontPadding="false"
            android:paddingHorizontal="6dp"
            android:paddingVertical="3dp"
            android:text="@string/order_btn_evaluate"
            android:textColor="@color/color_FF3FBFBD"
            android:textSize="16sp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

    </androidx.constraintlayout.widget.ConstraintLayout>

</androidx.constraintlayout.widget.ConstraintLayout>