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

    <data>

        <import type="android.view.View" />

        <variable
            name="vm"
            type="com.yidian.shenghuoquan.buserorder.viewmodel.SelectPickupPointViewModel" />

        <variable
            name="location"
            type="Boolean" />

        <variable
            name="data"
            type="Boolean" />

    </data>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fitsSystemWindows="true">

        <com.yidian.bcommon.widget.CommonTopBarView
            android:id="@+id/bv_top_bar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:CommonTopBarView_bg_color="@color/white"
            app:CommonTopBarView_horizontal_padding="@dimen/dp10"
            app:CommonTopBarView_statusBar_color="@color/white"
            app:CommonTopBarView_title_text="@string/select_pickup_point"
            app:layout_constraintTop_toTopOf="parent" />

        <com.yidian.shenghuoquan.buserorder.ui.widget.PickupPointSearchView
            android:id="@+id/sv_pickup_point_search"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/dp16"
            android:layout_marginTop="@dimen/dp9"
            android:layout_marginEnd="@dimen/dp16"
            app:layout_constraintTop_toBottomOf="@id/bv_top_bar" />

        <TextView
            android:id="@+id/tv_nearby_pickup_point"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/dp16"
            android:layout_marginTop="@dimen/dp20"
            android:text="@string/nearby_pickup_point"
            android:textColor="@color/color_333333"
            android:textSize="@dimen/sp16"
            android:visibility="@{location ? View.VISIBLE : View.GONE}"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/sv_pickup_point_search" />

        <com.scwang.smart.refresh.layout.SmartRefreshLayout
            android:id="@+id/rl_pickup_point_list"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_marginStart="@dimen/dp16"
            android:layout_marginTop="@dimen/dp16"
            android:layout_marginEnd="@dimen/dp16"
            android:layout_marginBottom="@dimen/dp16"
            android:background="@drawable/shape_solid_ffffff_corner_20"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tv_nearby_pickup_point">

            <FrameLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent">

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/rv_pickup_point_list"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:overScrollMode="never"
                    android:paddingStart="@dimen/dp16"
                    android:paddingTop="@dimen/dp20"
                    android:paddingEnd="@dimen/dp16" />

                <com.yidian.bcommon.widget.CommonEmptyPageView
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:visibility="@{data ? View.GONE : View.VISIBLE}"
                    app:CommonEmptyPageView_empty_content_text="暂无对应自提点"
                    app:CommonEmptyPageView_place_holder_img="@drawable/bcommon_icon_nothing_place_holder" />

            </FrameLayout>

        </com.scwang.smart.refresh.layout.SmartRefreshLayout>

    </androidx.constraintlayout.widget.ConstraintLayout>
</layout>