<?xml version="1.0" encoding="utf-8"?><!--
    Copyright 2023 Thomas Schneider

    This file is a part of Fedilab

    This program is free software; you can redistribute it and/or modify it under the terms of the
    GNU General Public License as published by the Free Software Foundation; either version 3 of the
    License, or (at your option) any later version.

    Fedilab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
    Public License for more details.

    You should have received a copy of the GNU General Public License along with Fedilab; if not,
    see <http://www.gnu.org/licenses>.
-->
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="?android:windowBackground">

    <com.google.android.material.card.MaterialCardView
        android:id="@+id/filters_container"
        style="@style/Widget.Material3.CardView.Elevated"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="12dp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:padding="12dp">

            <com.google.android.material.button.MaterialButton
                android:id="@+id/pickup_categories"
                style="@style/Widget.Material3.Button.OutlinedButton"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:text="@string/pickup_categories"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <com.google.android.material.button.MaterialButton
                android:id="@+id/pickup_languages"
                style="@style/Widget.Material3.Button.OutlinedButton"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:text="@string/pickup_languages"
                app:layout_constraintStart_toEndOf="@id/pickup_categories"
                app:layout_constraintTop_toTopOf="parent" />

            <TextView
                android:id="@+id/categories_view"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="5dp"
                android:drawablePadding="5dp"
                android:visibility="gone"
                app:drawableStartCompat="@drawable/ic_baseline_category_24"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/pickup_categories" />

            <TextView
                android:id="@+id/languages_view"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="5dp"
                android:drawablePadding="5dp"
                android:visibility="gone"
                app:drawableStartCompat="@drawable/ic_baseline_forum_24"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/categories_view" />

            <TextView
                android:id="@+id/text_spinner"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="14dp"
                android:labelFor="@+id/sensitive"
                android:text="@string/sensitive_video"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/languages_view" />

            <Spinner
                android:id="@+id/sensitive"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="10dp"
                app:layout_constraintStart_toEndOf="@+id/text_spinner"
                app:layout_constraintTop_toBottomOf="@+id/languages_view" />
        </androidx.constraintlayout.widget.ConstraintLayout>
    </com.google.android.material.card.MaterialCardView>
    <!-- Main Loader -->
    <RelativeLayout
        android:id="@+id/loader"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_marginTop="10dp"
        android:gravity="center"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/filters_container">

        <ProgressBar
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center" />
    </RelativeLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_marginTop="10dp"
        android:orientation="vertical"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/filters_container">

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/lv_instances"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:scrollbars="none" />

        <RelativeLayout
            android:id="@+id/no_action"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:visibility="gone">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_gravity="center"
                android:gravity="center"
                android:padding="10dp"
                android:text="@string/action_instance_empty_content"
                android:textSize="25sp" />
        </RelativeLayout>
    </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>