<?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:animateLayoutChanges="true"
	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/list_options" />

	<androidx.core.widget.NestedScrollView
		android:id="@+id/scrollView"
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		android:clipToPadding="false"
		android:scrollIndicators="top"
		android:scrollbars="vertical">

		<LinearLayout
			android:layout_width="match_parent"
			android:layout_height="wrap_content"
			android:orientation="vertical"
			android:paddingBottom="@dimen/margin_normal">

			<TextView
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:layout_marginHorizontal="@dimen/margin_normal"
				android:text="@string/list_mode"
				android:textAppearance="?textAppearanceTitleSmall" />

			<com.google.android.material.button.MaterialButtonToggleGroup
				android:id="@+id/checkableGroup"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:layout_marginHorizontal="@dimen/margin_normal"
				android:layout_marginTop="@dimen/margin_small"
				android:baselineAligned="false"
				android:orientation="horizontal"
				app:selectionRequired="true"
				app:singleSelection="true">

				<com.google.android.material.button.MaterialButton
					android:id="@+id/button_list"
					style="@style/Widget.Kotatsu.ToggleButton.Vertical"
					android:layout_width="0dp"
					android:layout_height="wrap_content"
					android:layout_weight="1"
					android:text="@string/compact"
					app:icon="@drawable/ic_list" />

				<com.google.android.material.button.MaterialButton
					android:id="@+id/button_list_detailed"
					style="@style/Widget.Kotatsu.ToggleButton.Vertical"
					android:layout_width="0dp"
					android:layout_height="wrap_content"
					android:layout_weight="1"
					android:text="@string/details"
					app:icon="@drawable/ic_list_detailed" />

				<com.google.android.material.button.MaterialButton
					android:id="@+id/button_grid"
					style="@style/Widget.Kotatsu.ToggleButton.Vertical"
					android:layout_width="0dp"
					android:layout_height="wrap_content"
					android:layout_weight="1"
					android:text="@string/grid"
					app:icon="@drawable/ic_grid" />

			</com.google.android.material.button.MaterialButtonToggleGroup>

			<TextView
				android:id="@+id/textView_grid_title"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:layout_marginHorizontal="@dimen/margin_normal"
				android:layout_marginTop="@dimen/margin_normal"
				android:singleLine="true"
				android:text="@string/grid_size"
				android:textAppearance="?textAppearanceTitleSmall"
				android:visibility="gone"
				tools:visibility="visible" />

			<com.google.android.material.slider.Slider
				android:id="@+id/slider_grid"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:layout_marginHorizontal="16dp"
				android:stepSize="5"
				android:valueFrom="50"
				android:valueTo="150"
				android:visibility="gone"
				app:labelBehavior="floating"
				app:tickVisible="false"
				tools:value="100"
				tools:visibility="visible" />

			<TextView
				android:id="@+id/textView_order_title"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:layout_marginHorizontal="@dimen/margin_normal"
				android:layout_marginTop="@dimen/margin_normal"
				android:singleLine="true"
				android:text="@string/sort_order"
				android:textAppearance="?textAppearanceTitleSmall"
				android:visibility="gone"
				tools:visibility="visible" />

			<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="16dp"
				android:layout_marginTop="@dimen/margin_normal"
				android:visibility="gone"
				tools:visibility="visible">

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

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

			<com.google.android.material.materialswitch.MaterialSwitch
				android:id="@+id/switch_grouping"
				android:layout_width="match_parent"
				android:layout_height="?android:listPreferredItemHeightSmall"
				android:layout_marginTop="@dimen/margin_normal"
				android:drawablePadding="?android:listPreferredItemPaddingStart"
				android:ellipsize="end"
				android:paddingStart="?android:listPreferredItemPaddingStart"
				android:paddingEnd="?android:listPreferredItemPaddingEnd"
				android:singleLine="true"
				android:text="@string/group"
				android:textAppearance="?attr/textAppearanceButton"
				android:textColor="?colorOnSurfaceVariant"
				android:visibility="gone"
				app:drawableStartCompat="@drawable/ic_list_group"
				tools:visibility="visible" />

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