<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright (c) 2018 Threema GmbH
  ~ All rights reserved.
  -->

<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
	xmlns:app="http://schemas.android.com/apk/res-auto"
	android:id="@+id/parent_layout"
	android:layout_width="match_parent"
	android:layout_height="match_parent">

	<include layout="@layout/toolbar_view" />

	<androidx.constraintlayout.widget.ConstraintLayout
		android:layout_width="match_parent"
		android:layout_height="@dimen/directory_search_bar_height"
		android:layout_gravity="top"
		android:paddingTop="8dp"
		android:paddingBottom="4dp"
		android:paddingLeft="16dp"
		android:paddingRight="8dp"
		android:background="?compose_container"
		app:layout_behavior="@string/appbar_scrolling_view_behavior">

		<ch.threema.app.ui.ThreemaSearchView
			android:id="@+id/search"
			android:layout_width="0dp"
			android:layout_height="wrap_content"
			android:layout_marginRight="8dp"
			android:layout_gravity="center_vertical"
			android:background="?compose_edittext_bubble"
			android:textColor="?android:textColorPrimary"
			app:iconifiedByDefault="false"
			app:defaultQueryHint="@string/directory_search"
			app:layout_constraintHorizontal_chainStyle="spread_inside"
			app:layout_constraintHorizontal_weight="1"
			app:layout_constraintTop_toTopOf="parent"
			app:layout_constraintLeft_toLeftOf="parent"
			app:layout_constraintBottom_toBottomOf="parent"
			app:layout_constraintRight_toLeftOf="@+id/category_selector_button"/>

		<androidx.appcompat.widget.AppCompatImageButton
			style="?android:attr/borderlessButtonStyle"
			android:id="@+id/category_selector_button"
			android:layout_width="48dp"
			android:layout_height="48dp"
			android:layout_gravity="center_vertical|right"
			android:background="?android:selectableItemBackground"
			android:tint="?attr/textColorSecondary"
			app:srcCompat="@drawable/ic_filter_list_black_24dp"
			android:contentDescription="@string/work_select_categories"
			app:layout_constraintTop_toTopOf="parent"
			app:layout_constraintLeft_toRightOf="@id/search"
			app:layout_constraintBottom_toBottomOf="parent"
			app:layout_constraintRight_toRightOf="parent"
			app:layout_goneMarginLeft="0dp"
			app:layout_goneMarginRight="0dp"/>

	</androidx.constraintlayout.widget.ConstraintLayout>

	<LinearLayout
		android:layout_width="match_parent"
		android:layout_height="match_parent"
		android:layout_marginTop="@dimen/directory_search_bar_height"
		app:layout_behavior="@string/appbar_scrolling_view_behavior"
		android:orientation="vertical">

		<com.google.android.material.chip.ChipGroup
			android:id="@+id/chip_group"
			android:layout_width="match_parent"
			android:layout_height="wrap_content"
			android:layout_marginLeft="16dp"
			android:layout_marginRight="16dp"
			app:chipSpacingHorizontal="4dp"
			app:chipSpacingVertical="0dp"
			app:lineSpacing="-4dp"
			app:layout_constraintBottom_toBottomOf="parent"
			app:layout_constraintLeft_toLeftOf="parent"
			app:layout_constraintTop_toTopOf="parent"
			app:singleLine="false"
			android:visibility="gone" />

		<ch.threema.app.ui.EmptyRecyclerView
			android:id="@+id/recycler"
			android:layout_width="match_parent"
			android:layout_height="match_parent"
			android:layout_marginTop="4dp"
			android:layout_marginLeft="@dimen/tablet_additional_padding_left_right"
			android:layout_marginRight="@dimen/tablet_additional_padding_left_right"
			app:layout_behavior="@string/appbar_scrolling_view_behavior" />

	</LinearLayout>

</androidx.coordinatorlayout.widget.CoordinatorLayout>
