<?xml version="1.0" encoding="utf-8"?>
<layout 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">

    <data>

        <variable
            name="model"
            type="com.lukouguoji.gnc.page.shouyun.details.dialog.GncShouYunSyncDialogModel" />
    </data>

    <LinearLayout
        shape_bg_color="@{@color/backgroud_gray}"
        shape_radius="@{8}"
        android:layout_width="800dp"
        android:layout_height="wrap_content"
        android:background="@color/backgroud_gray"
        android:gravity="center_horizontal"
        android:orientation="vertical">

        <TextView
            shape_bg_color="@{@color/colorPrimary}"
            shape_radius_top="@{8}"
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:background="@color/colorPrimary"
            android:gravity="center"
            android:text="同步操作"
            android:textColor="@color/white"
            android:textSize="18sp"
            android:textStyle="bold" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="15dp"
            android:text='@{"运单号：" + model.waybill}'
            android:textColor="@color/text_normal"
            android:textSize="16sp"
            android:textStyle="bold" />

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/rv"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            viewHolder="@{model.viewHolder}"
            itemLayoutId="@{model.itemLayoutId}"
            app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
            tools:itemCount="4"
            tools:listitem="@layout/item_gnc_shou_yun_sync" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:gravity="center_vertical"
            android:paddingHorizontal="15dp">

            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text='@{"总件数："+model.number+"，总重量："+model.weight+"KG"}'
                android:textColor="@color/text_system"
                android:textSize="18sp"
                android:textStyle="bold"
                tools:text="总件数：0，总重量：0KG" />

        </LinearLayout>


        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:layout_marginBottom="15dp">

            <TextView
                style="@style/tv_bottom_btn"
                android:onClick="@{()-> model.dismiss()}"
                android:text="取消" />

            <TextView
                style="@style/tv_bottom_btn"
                android:onClick="@{()-> model.confirmClick()}"
                android:text="同步" />

        </LinearLayout>

    </LinearLayout>
</layout>