<?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:orientation="vertical">

	<org.koitharu.kotatsu.core.ui.sheet.AdaptiveSheetHeaderBar
		android:id="@+id/headerBar"
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		app:title="@string/filter" />

	<androidx.core.widget.NestedScrollView
		android:id="@+id/scrollView"
		android:layout_width="match_parent"
		android:layout_height="match_parent"
		android:clipToPadding="false"
		android:scrollIndicators="top"
		tools:ignore="UnusedAttribute">

		<LinearLayout
			android:id="@+id/layout_body"
			android:layout_width="match_parent"
			android:layout_height="wrap_content"
			android:orientation="vertical"
			android:paddingHorizontal="@dimen/margin_small"
			android:paddingBottom="@dimen/margin_normal">

			<org.koitharu.kotatsu.filter.ui.FilterFieldLayout
				android:id="@+id/layout_order"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				app:title="@string/sort_order">

				<com.google.android.material.card.MaterialCardView
					android:id="@+id/card_order"
					style="?materialCardViewOutlinedStyle"
					android:layout_width="match_parent"
					android:layout_height="wrap_content"
					android:layout_marginHorizontal="@dimen/margin_small"
					android:layout_marginTop="@dimen/margin_small">

					<Spinner
						android:id="@+id/spinner_order"
						android:layout_width="match_parent"
						android:layout_height="@dimen/spinner_height"
						android:minHeight="?listPreferredItemHeightSmall"
						android:paddingHorizontal="8dp" />

				</com.google.android.material.card.MaterialCardView>

			</org.koitharu.kotatsu.filter.ui.FilterFieldLayout>

			<org.koitharu.kotatsu.filter.ui.FilterFieldLayout
				android:id="@+id/layout_locale"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:layout_marginTop="@dimen/margin_small"
				app:title="@string/language">

				<com.google.android.material.card.MaterialCardView
					android:id="@+id/card_locale"
					style="?materialCardViewOutlinedStyle"
					android:layout_width="match_parent"
					android:layout_height="wrap_content"
					android:layout_marginHorizontal="@dimen/margin_small"
					android:layout_marginTop="@dimen/margin_small">

					<Spinner
						android:id="@+id/spinner_locale"
						android:layout_width="match_parent"
						android:layout_height="@dimen/spinner_height"
						android:minHeight="?listPreferredItemHeightSmall"
						android:paddingHorizontal="8dp"
						android:popupBackground="@drawable/m3_spinner_popup_background" />

				</com.google.android.material.card.MaterialCardView>

			</org.koitharu.kotatsu.filter.ui.FilterFieldLayout>

			<org.koitharu.kotatsu.filter.ui.FilterFieldLayout
				android:id="@+id/layout_original_locale"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:layout_marginTop="@dimen/margin_small"
				app:title="@string/original_language">

				<com.google.android.material.card.MaterialCardView
					android:id="@+id/card_original_locale"
					style="?materialCardViewOutlinedStyle"
					android:layout_width="match_parent"
					android:layout_height="wrap_content"
					android:layout_marginHorizontal="@dimen/margin_small"
					android:layout_marginTop="@dimen/margin_small">

					<Spinner
						android:id="@+id/spinner_original_locale"
						android:layout_width="match_parent"
						android:layout_height="@dimen/spinner_height"
						android:minHeight="?listPreferredItemHeightSmall"
						android:paddingHorizontal="8dp"
						android:popupBackground="@drawable/m3_spinner_popup_background" />

				</com.google.android.material.card.MaterialCardView>

			</org.koitharu.kotatsu.filter.ui.FilterFieldLayout>

			<org.koitharu.kotatsu.filter.ui.FilterFieldLayout
				android:id="@+id/layout_genres"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:layout_marginTop="@dimen/margin_small"
				app:showMoreButton="true"
				app:title="@string/genres">

				<org.koitharu.kotatsu.core.ui.widgets.ChipsView
					android:id="@+id/chips_genres"
					android:layout_width="match_parent"
					android:layout_height="wrap_content"
					android:layout_marginHorizontal="@dimen/margin_small"
					android:layout_marginTop="@dimen/margin_small"
					app:chipStyle="@style/Widget.Kotatsu.Chip.Filter" />

			</org.koitharu.kotatsu.filter.ui.FilterFieldLayout>

			<org.koitharu.kotatsu.filter.ui.FilterFieldLayout
				android:id="@+id/layout_genresExclude"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:layout_marginTop="@dimen/margin_small"
				app:showMoreButton="true"
				app:title="@string/genres_exclude">

				<org.koitharu.kotatsu.core.ui.widgets.ChipsView
					android:id="@+id/chips_genresExclude"
					android:layout_width="match_parent"
					android:layout_height="wrap_content"
					android:layout_marginHorizontal="@dimen/margin_small"
					android:layout_marginTop="@dimen/margin_small"
					app:chipStyle="@style/Widget.Kotatsu.Chip.Filter" />

			</org.koitharu.kotatsu.filter.ui.FilterFieldLayout>

			<org.koitharu.kotatsu.filter.ui.FilterFieldLayout
				android:id="@+id/layout_types"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:layout_marginTop="@dimen/margin_small"
				app:title="@string/type">

				<org.koitharu.kotatsu.core.ui.widgets.ChipsView
					android:id="@+id/chips_types"
					android:layout_width="match_parent"
					android:layout_height="wrap_content"
					android:layout_marginHorizontal="@dimen/margin_small"
					android:layout_marginTop="@dimen/margin_small"
					app:chipStyle="@style/Widget.Kotatsu.Chip.Filter" />

			</org.koitharu.kotatsu.filter.ui.FilterFieldLayout>

			<org.koitharu.kotatsu.filter.ui.FilterFieldLayout
				android:id="@+id/layout_state"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:layout_marginTop="@dimen/margin_small"
				app:title="@string/state">

				<org.koitharu.kotatsu.core.ui.widgets.ChipsView
					android:id="@+id/chips_state"
					android:layout_width="match_parent"
					android:layout_height="wrap_content"
					android:layout_marginHorizontal="@dimen/margin_small"
					android:layout_marginTop="@dimen/margin_small"
					app:chipStyle="@style/Widget.Kotatsu.Chip.Filter" />

			</org.koitharu.kotatsu.filter.ui.FilterFieldLayout>

			<org.koitharu.kotatsu.filter.ui.FilterFieldLayout
				android:id="@+id/layout_contentRating"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:layout_marginTop="@dimen/margin_small"
				app:title="@string/content_rating">

				<org.koitharu.kotatsu.core.ui.widgets.ChipsView
					android:id="@+id/chips_contentRating"
					android:layout_width="match_parent"
					android:layout_height="wrap_content"
					android:layout_marginHorizontal="@dimen/margin_small"
					android:layout_marginTop="@dimen/margin_small"
					app:chipStyle="@style/Widget.Kotatsu.Chip.Filter" />

			</org.koitharu.kotatsu.filter.ui.FilterFieldLayout>

			<org.koitharu.kotatsu.filter.ui.FilterFieldLayout
				android:id="@+id/layout_demographics"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:layout_marginTop="@dimen/margin_small"
				app:title="@string/demographics">

				<org.koitharu.kotatsu.core.ui.widgets.ChipsView
					android:id="@+id/chips_demographics"
					android:layout_width="match_parent"
					android:layout_height="wrap_content"
					android:layout_marginHorizontal="@dimen/margin_small"
					android:layout_marginTop="@dimen/margin_small"
					app:chipStyle="@style/Widget.Kotatsu.Chip.Filter" />

			</org.koitharu.kotatsu.filter.ui.FilterFieldLayout>

			<org.koitharu.kotatsu.filter.ui.FilterFieldLayout
				android:id="@+id/layout_year"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:layout_marginTop="@dimen/margin_small"
				app:title="@string/year">

				<com.google.android.material.slider.Slider
					android:id="@+id/slider_year"
					android:layout_width="match_parent"
					android:layout_height="wrap_content"
					android:stepSize="1"
					app:labelBehavior="gone"
					app:tickVisible="true"
					tools:value="2020"
					tools:valueFrom="1900"
					tools:valueTo="2090" />

			</org.koitharu.kotatsu.filter.ui.FilterFieldLayout>

			<org.koitharu.kotatsu.filter.ui.FilterFieldLayout
				android:id="@+id/layout_yearsRange"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:layout_marginTop="@dimen/margin_small"
				app:title="@string/years">

				<com.google.android.material.slider.RangeSlider
					android:id="@+id/slider_yearsRange"
					android:layout_width="match_parent"
					android:layout_height="wrap_content"
					android:layout_marginTop="@dimen/margin_normal"
					android:stepSize="1"
					app:labelBehavior="gone"
					app:tickVisible="true"
					tools:valueFrom="1900"
					tools:valueTo="2090" />

			</org.koitharu.kotatsu.filter.ui.FilterFieldLayout>

		</LinearLayout>
	</androidx.core.widget.NestedScrollView>
</LinearLayout>
