<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:android="http://schemas.android.com/apk/res/android">

    <com.google.android.material.appbar.AppBarLayout
        app:liftOnScroll="true"
        android:background="@android:color/transparent"
        android:elevation="0dp"
        app:liftOnScrollTargetViewId="@id/recyclerviewhistorys"
        app:elevation="0dp"
        android:fitsSystemWindows="true"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <com.google.android.material.appbar.MaterialToolbar
            android:id="@+id/history_toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            app:title="@string/downloads"
            app:menu="@menu/history_menu"
            />

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            app:layout_scrollFlags="scroll|enterAlways"
            android:layout_margin="10dp">
            <HorizontalScrollView
                android:layout_width="wrap_content"
                android:scrollbars="none"
                android:layout_height="wrap_content">

                <LinearLayout
                    android:id="@+id/history_selection_chips"
                    android:layout_width="wrap_content"
                    android:visibility="gone"
                    android:layout_height="wrap_content">

                    <com.google.android.material.chip.ChipGroup
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        app:selectionRequired="false"
                        app:singleSelection="false">

                        <com.google.android.material.chip.Chip
                            android:id="@+id/sortChip"
                            style="@style/Widget.Material3.Chip.Assist"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="@string/sort_by"
                            app:chipIcon="@drawable/ic_down" />

                    </com.google.android.material.chip.ChipGroup>

                    <View style="@style/Divider.Vertical"/>

                    <com.google.android.material.chip.ChipGroup
                        android:layout_width="wrap_content"
                        app:selectionRequired="false"
                        app:singleSelection="true"
                        android:layout_height="wrap_content">

                        <com.google.android.material.chip.Chip
                            android:id="@+id/audio_chip"
                            style="@style/Widget.Material3.Chip.Filter"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="@string/audio"/>

                        <com.google.android.material.chip.Chip
                            android:id="@+id/video_chip"
                            style="@style/Widget.Material3.Chip.Filter"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="@string/video"/>

                        <com.google.android.material.chip.Chip
                            android:id="@+id/command_chip"
                            style="@style/Widget.Material3.Chip.Filter"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="@string/command"/>

                    </com.google.android.material.chip.ChipGroup>

                    <View android:id="@+id/website_divider" style="@style/Divider.Vertical"/>

                    <com.google.android.material.chip.ChipGroup
                        android:id="@+id/website_chip_group"
                        app:selectionRequired="false"
                        app:singleSelection="true"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content">

                    </com.google.android.material.chip.ChipGroup>

                </LinearLayout>

            </HorizontalScrollView>

        </RelativeLayout>

    </com.google.android.material.appbar.AppBarLayout>

    <androidx.recyclerview.widget.RecyclerView
        app:layout_behavior="@string/appbar_scrolling_view_behavior"
        android:layout_width="match_parent"
        android:id="@+id/recyclerviewhistorys"
        android:orientation="vertical"
        android:layout_height="wrap_content"
        android:scrollbars="none"
        android:clipToPadding="false"
        android:paddingBottom="100dp"
        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager">

    </androidx.recyclerview.widget.RecyclerView>

    <include layout="@layout/history_no_results"
        android:visibility="gone" />


    <include layout="@layout/history_item_details_bottom_sheet"
        android:visibility="gone" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>