<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:layout_gravity="bottom"
    android:clickable="true"
    android:focusable="true"
    android:orientation="vertical"
    android:transitionName="checkoutTransition"
    tools:context="com.anytypeio.anytype.ui.sets.modals.filter.CreateFilterFromSelectedValueFragment">

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

        <View
            android:id="@+id/dragger"
            android:layout_width="@dimen/default_dragger_width"
            android:layout_height="@dimen/default_dragger_height"
            android:layout_marginTop="6dp"
            android:background="@drawable/dragger"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <ImageView
            android:id="@+id/ivRelationIcon"
            android:layout_width="48dp"
            android:layout_height="48dp"
            android:layout_marginStart="20dp"
            android:layout_marginTop="14dp"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/dragger"
            tools:src="@drawable/ic_relation_name_48" />

        <TextView
            android:id="@+id/tvRelationName"
            style="@style/TextView.ContentStyle.PreviewTitles.2.Medium"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="12dp"
            android:layout_marginTop="16dp"
            android:layout_marginEnd="20dp"
            android:ellipsize="end"
            android:maxLines="1"
            android:singleLine="true"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@+id/ivRelationIcon"
            app:layout_constraintTop_toBottomOf="@+id/dragger"
            tools:text="Tag" />

        <TextView
            android:id="@+id/tvFilterCondition"
            style="@style/TextView.ContentStyle.Relations.1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:paddingStart="@dimen/dp_12"
            android:paddingEnd="@dimen/dp_12"
            android:paddingBottom="@dimen/dp_12"
            android:text="@string/filter_condition_is"
            android:textColor="@color/text_secondary"
            app:drawableEndCompat="@drawable/ic_list_arrow"
            app:layout_constraintStart_toEndOf="@+id/ivRelationIcon"
            app:layout_constraintTop_toBottomOf="@+id/tvRelationName"
            tools:text="Is" />

        <include
            android:id="@+id/searchBar"
            layout="@layout/widget_search_view"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginStart="20dp"
            android:layout_marginTop="20dp"
            android:layout_marginEnd="20dp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/ivRelationIcon" />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/rvViewerFilterRecycler"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_marginStart="20dp"
        android:layout_marginTop="16dp"
        android:layout_marginEnd="20dp"
        android:layout_weight="1"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/searchBar" />

    <com.anytypeio.anytype.core_ui.widgets.ButtonPrimaryNumber
        android:id="@+id/btnBottomAction"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:layout_marginTop="@dimen/dp_6"
        android:layout_marginStart="20dp"
        android:layout_marginEnd="20dp"
        android:layout_marginBottom="@dimen/dp_20"
        app:buttonTitle="@string/apply">
    </com.anytypeio.anytype.core_ui.widgets.ButtonPrimaryNumber>

</LinearLayout>
