<?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/playmate_confirm_order" />

    <androidx.core.widget.NestedScrollView
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:background="@color/color_FFF1F2F5"
        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:id="@+id/cl_content"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingHorizontal="16dp"
            android:paddingTop="16dp"
            android:paddingBottom="104dp">

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/cl_user_info"
                android:layout_width="match_parent"
                android:layout_height="60dp"
                android:background="@drawable/common_white_radius_16_bg"
                android:paddingHorizontal="12dp"
                app:layout_constraintTop_toTopOf="parent">

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

                <androidx.appcompat.widget.AppCompatTextView
                    android:id="@+id/tv_user_name"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginHorizontal="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="parent"
                    app:layout_constraintEnd_toStartOf="@id/iv_star"
                    app:layout_constraintHorizontal_bias="0"
                    app:layout_constraintStart_toEndOf="@id/iv_avatar"
                    app:layout_constraintTop_toTopOf="parent"
                    tools:text="UserName" />

                <androidx.appcompat.widget.AppCompatImageView
                    android:id="@+id/iv_star"
                    android:layout_width="16dp"
                    android:layout_height="16dp"
                    android:layout_marginEnd="4dp"
                    app:layout_constraintBottom_toBottomOf="@id/tv_star"
                    app:layout_constraintEnd_toStartOf="@id/tv_star"
                    app:layout_constraintTop_toTopOf="@id/tv_star"
                    app:srcCompat="@drawable/common_evaluate_star_selected_ic" />

                <androidx.appcompat.widget.AppCompatTextView
                    android:id="@+id/tv_star"
                    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="16sp"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toTopOf="parent"
                    tools:text="4.2" />

            </androidx.constraintlayout.widget.ConstraintLayout>

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/cl_order_info"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:background="@drawable/common_white_radius_16_bg"
                android:paddingHorizontal="12dp"
                android:paddingBottom="10dp"
                app:layout_constraintTop_toBottomOf="@id/cl_user_info">

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/cl_category"
                    android:layout_width="match_parent"
                    android:layout_height="40dp"
                    app:layout_constraintTop_toTopOf="parent">

                    <com.adealink.frame.image.view.NetworkImageView
                        android:id="@+id/iv_category"
                        android:layout_width="26dp"
                        android:layout_height="26dp"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                    <androidx.appcompat.widget.AppCompatTextView
                        android:id="@+id/tv_category"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginHorizontal="8dp"
                        android:ellipsize="end"
                        android:fontFamily="@font/poppins_semibold"
                        android:includeFontPadding="false"
                        android:singleLine="true"
                        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="0"
                        app:layout_constraintStart_toEndOf="@id/iv_category"
                        app:layout_constraintTop_toTopOf="parent"
                        tools:text="品类名称" />

                </androidx.constraintlayout.widget.ConstraintLayout>

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

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/cl_price"
                    android:layout_width="match_parent"
                    android:layout_height="38dp"
                    app:layout_constraintTop_toBottomOf="@id/cl_category">

                    <androidx.appcompat.widget.AppCompatTextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginHorizontal="8dp"
                        android:ellipsize="end"
                        android:fontFamily="@font/poppins_semibold"
                        android:includeFontPadding="false"
                        android:singleLine="true"
                        android:text="@string/order_price"
                        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="0"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                    <com.adealink.weparty.module.playmate.widget.PriceView
                        android:id="@+id/v_price"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="4dp"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintTop_toTopOf="parent"
                        app:price_icon_size="16dp"
                        app:price_text_bold="true"
                        app:price_text_size="16sp"
                        app:unit_text_size="16sp" />

                </androidx.constraintlayout.widget.ConstraintLayout>

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/cl_count"
                    android:layout_width="match_parent"
                    android:layout_height="38dp"
                    app:layout_constraintTop_toBottomOf="@id/cl_price">

                    <androidx.appcompat.widget.AppCompatTextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginHorizontal="8dp"
                        android:ellipsize="end"
                        android:fontFamily="@font/poppins_semibold"
                        android:includeFontPadding="false"
                        android:singleLine="true"
                        android:text="@string/order_quantity"
                        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="0"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                    <com.adealink.weparty.commonui.widget.NumberIncreaseView
                        android:id="@+id/v_number"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        app:default_number="1"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                </androidx.constraintlayout.widget.ConstraintLayout>

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/cl_discount"
                    android:layout_width="match_parent"
                    android:layout_height="38dp"
                    android:visibility="gone"
                    app:layout_constraintTop_toBottomOf="@id/cl_count"
                    tools:visibility="visible">

                    <androidx.appcompat.widget.AppCompatTextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginHorizontal="8dp"
                        android:ellipsize="end"
                        android:fontFamily="@font/poppins_semibold"
                        android:includeFontPadding="false"
                        android:singleLine="true"
                        android:text="@string/common_discount"
                        android:textColor="@color/color_FF1D2129"
                        android:textSize="12sp"
                        app:layout_constrainedWidth="true"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toStartOf="@id/v_price_discount"
                        app:layout_constraintHorizontal_bias="0"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                    <androidx.appcompat.widget.AppCompatTextView
                        android:id="@+id/v_discount"
                        style="@style/CommonDiscountPriceView"
                        android:layout_width="wrap_content"
                        android:layout_marginEnd="4dp"
                        app:layout_constraintBottom_toBottomOf="@id/v_price_discount"
                        app:layout_constraintEnd_toStartOf="@id/v_price_discount"
                        app:layout_constraintTop_toTopOf="@id/v_price_discount"
                        tools:text="New Only | 90% OFF" />

                    <com.adealink.weparty.module.playmate.widget.PriceView
                        android:id="@+id/v_price_discount"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="4dp"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintTop_toTopOf="parent"
                        app:price_icon_size="16dp"
                        app:price_text_bold="true"
                        app:price_text_size="16sp" />

                </androidx.constraintlayout.widget.ConstraintLayout>

            </androidx.constraintlayout.widget.ConstraintLayout>

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/cl_mark"
                android:layout_width="match_parent"
                android:layout_height="50dp"
                android:layout_marginTop="10dp"
                android:background="@drawable/common_white_radius_16_bg"
                android:paddingHorizontal="12dp"
                app:layout_constraintTop_toBottomOf="@id/cl_order_info">

                <androidx.appcompat.widget.AppCompatTextView
                    android:id="@+id/tv_mark"
                    android:layout_width="wrap_content"
                    android:layout_height="0dp"
                    android:layout_marginHorizontal="8dp"
                    android:ellipsize="end"
                    android:fontFamily="@font/poppins_semibold"
                    android:gravity="center"
                    android:includeFontPadding="false"
                    android:singleLine="true"
                    android:text="@string/order_remark"
                    android:textColor="@color/color_FF1D2129"
                    android:textSize="14sp"
                    app:layout_constrainedWidth="true"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintHorizontal_bias="0"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <androidx.appcompat.widget.AppCompatTextView
                    android:id="@+id/tv_remark_input"
                    android:layout_width="0dp"
                    android:layout_height="0dp"
                    android:layout_marginHorizontal="8dp"
                    android:background="@null"
                    android:fontFamily="@font/poppins_semibold"
                    android:gravity="start|center_vertical"
                    android:hint="@string/order_remark_hint"
                    android:includeFontPadding="false"
                    android:lines="1"
                    android:paddingVertical="8dp"
                    android:singleLine="true"
                    android:textColor="@color/color_FF1D2129"
                    android:textColorHint="@color/color_FFC9CDD4"
                    android:textSize="12sp"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintHorizontal_bias="0"
                    app:layout_constraintStart_toEndOf="@id/tv_mark"
                    app:layout_constraintTop_toTopOf="parent" />

            </androidx.constraintlayout.widget.ConstraintLayout>

        </androidx.constraintlayout.widget.ConstraintLayout>

    </androidx.core.widget.NestedScrollView>

    <include
        android:id="@+id/v_bottom"
        layout="@layout/layout_create_order_bottom"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="24dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>