<?xml version="1.0" encoding="utf-8"?><!--
    Copyright 2022 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>.
-->

<ScrollView 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="wrap_content">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="5dp">

        <com.google.android.material.button.MaterialButton
            android:id="@+id/assign"
            style="@style/Widget.Material3.Button.OutlinedButton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="5dp"
            app:layout_constraintEnd_toStartOf="@id/status"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <com.google.android.material.button.MaterialButton
            android:id="@+id/status"
            style="@style/Widget.Material3.Button.OutlinedButton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="5dp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@id/assign"
            app:layout_constraintTop_toTopOf="parent" />


        <androidx.constraintlayout.widget.Barrier
            android:id="@+id/assign_status_buttons_barrier"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:barrierDirection="bottom"
            app:constraint_referenced_ids="assign,status" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/permissions_label"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
            android:text="@string/permissions"
            app:layout_constraintEnd_toStartOf="@id/stats_label_end_barrier"
            app:layout_constraintHorizontal_bias="1"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/assign_status_buttons_barrier" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/username_label"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:text="@string/account"
            app:layout_constraintEnd_toStartOf="@id/stats_label_end_barrier"
            app:layout_constraintHorizontal_bias="1"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/permissions_label" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/email_label"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:text="@string/email"
            app:layout_constraintEnd_toStartOf="@id/stats_label_end_barrier"
            app:layout_constraintHorizontal_bias="1"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/username_label" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/email_status_label"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:text="@string/email_status"
            app:layout_constraintEnd_toStartOf="@id/stats_label_end_barrier"
            app:layout_constraintHorizontal_bias="1"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/email_label" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/login_status_label"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:text="@string/login_status"
            app:layout_constraintEnd_toStartOf="@id/stats_label_end_barrier"
            app:layout_constraintHorizontal_bias="1"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/email_status_label" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/joined_label"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:text="@string/joined"
            app:layout_constraintEnd_toStartOf="@id/stats_label_end_barrier"
            app:layout_constraintHorizontal_bias="1"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/login_status_label" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/recent_ip_label"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:text="@string/recent_ip"
            app:layout_constraintEnd_toStartOf="@id/stats_label_end_barrier"
            app:layout_constraintHorizontal_bias="1"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/joined_label" />


        <androidx.constraintlayout.widget.Barrier
            android:id="@+id/stats_label_end_barrier"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:barrierDirection="end"
            app:constraint_referenced_ids="permissions_label,email_label,email_status_label,login_status_label,joined_label,recent_ip_label" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/permissions"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            app:layout_constraintBottom_toBottomOf="@id/permissions_label"
            app:layout_constraintStart_toEndOf="@id/stats_label_end_barrier"
            app:layout_constraintTop_toTopOf="@id/permissions_label" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/username"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            app:layout_constraintBottom_toBottomOf="@id/username_label"
            app:layout_constraintStart_toEndOf="@id/stats_label_end_barrier"
            app:layout_constraintTop_toTopOf="@id/username_label" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/email"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            app:layout_constraintBottom_toBottomOf="@id/email_label"
            app:layout_constraintStart_toEndOf="@id/stats_label_end_barrier"
            app:layout_constraintTop_toTopOf="@id/email_label" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/email_status"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            app:layout_constraintBottom_toBottomOf="@id/email_status_label"
            app:layout_constraintStart_toEndOf="@id/stats_label_end_barrier"
            app:layout_constraintTop_toTopOf="@id/email_status_label" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/login_status"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            app:layout_constraintStart_toEndOf="@id/stats_label_end_barrier"
            app:layout_constraintTop_toBottomOf="@id/email_status"
            app:layout_constraintTop_toTopOf="@id/login_status_label" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/joined"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            app:layout_constraintBottom_toBottomOf="@id/joined_label"
            app:layout_constraintStart_toEndOf="@id/stats_label_end_barrier"
            app:layout_constraintTop_toTopOf="@id/joined_label" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/recent_ip"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            app:layout_constraintBottom_toBottomOf="@id/recent_ip_label"
            app:layout_constraintStart_toEndOf="@id/stats_label_end_barrier"
            app:layout_constraintTop_toTopOf="@id/recent_ip_label" />

        <androidx.constraintlayout.widget.Barrier
            android:id="@+id/stats_bottom_barrier"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:barrierDirection="bottom"
            app:constraint_referenced_ids="recent_ip,recent_ip_label" />


        <com.google.android.material.button.MaterialButton
            android:id="@+id/reject"
            style="@style/Widget.Material3.Button.OutlinedButton"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="5dp"
            android:text="@string/reject"
            app:layout_constraintEnd_toStartOf="@id/allow"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/stats_bottom_barrier" />


        <com.google.android.material.button.MaterialButton
            android:id="@+id/allow"
            style="@style/Widget.Material3.Button.OutlinedButton"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="5dp"
            android:text="@string/allow"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@id/reject"
            app:layout_constraintTop_toBottomOf="@id/stats_bottom_barrier" />


        <androidx.constraintlayout.widget.Group
            android:id="@+id/allow_reject_group"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:constraint_referenced_ids="reject,allow" />

        <androidx.constraintlayout.widget.Barrier
            android:id="@+id/allow_reject_buttons_barrier"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:barrierDirection="bottom"
            app:constraint_referenced_ids="reject,allow" />


        <com.google.android.material.button.MaterialButton
            android:id="@+id/warn"
            style="@style/Widget.Material3.Button.OutlinedButton"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="5dp"
            android:text="@string/warn"
            app:layout_constraintEnd_toStartOf="@id/disable"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/allow_reject_buttons_barrier" />


        <com.google.android.material.button.MaterialButton
            android:id="@+id/disable"
            style="@style/Widget.Material3.Button.OutlinedButton"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="5dp"
            android:text="@string/disable"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@id/warn"
            app:layout_constraintTop_toBottomOf="@id/allow_reject_buttons_barrier" />


        <androidx.constraintlayout.widget.Barrier
            android:id="@+id/warn_disable_buttons_barrier"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:barrierDirection="bottom"
            app:constraint_referenced_ids="warn,disable" />


        <com.google.android.material.button.MaterialButton
            android:id="@+id/silence"
            style="@style/Widget.Material3.Button.OutlinedButton"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="5dp"
            android:text="@string/silence"
            app:layout_constraintEnd_toStartOf="@id/suspend"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/warn_disable_buttons_barrier" />


        <com.google.android.material.button.MaterialButton
            android:id="@+id/suspend"
            style="@style/Widget.Material3.Button.OutlinedButton"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="5dp"
            android:text="@string/suspend"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@id/silence"
            app:layout_constraintTop_toBottomOf="@id/warn_disable_buttons_barrier" />


        <androidx.constraintlayout.widget.Barrier
            android:id="@+id/buttons_bottom_barrier"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:barrierDirection="bottom"
            app:constraint_referenced_ids="warn,disable,silence" />

        <androidx.appcompat.widget.AppCompatCheckBox
            android:id="@+id/email_user"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
            android:checked="true"
            android:text="@string/email_user"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/buttons_bottom_barrier" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/comment_label"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
            android:labelFor="@+id/comment"
            android:text="@string/custom_warning"
            app:layout_constraintTop_toBottomOf="@id/email_user" />

        <androidx.appcompat.widget.AppCompatEditText
            android:id="@+id/comment"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:importantForAutofill="noExcludeDescendants"
            android:minLines="3"
            app:layout_constraintTop_toBottomOf="@id/comment_label" />

        <TextView
            android:id="@+id/lv_statuses_label"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
            android:text="@string/list_reported_statuses"
            app:layout_constraintTop_toBottomOf="@id/comment" />

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/lv_statuses"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:divider="@null"
            android:scrollbars="none"
            app:layout_constraintTop_toBottomOf="@id/lv_statuses_label" />

        <androidx.constraintlayout.widget.Group
            android:id="@+id/statuses_group"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:visibility="gone"
            app:constraint_referenced_ids="lv_statuses_label,lv_statuses" />

        <!--
        <Button
            android:id="@+id/action"
            style="@style/colored_button"
            android:layout_width="wrap_content"
            android:layout_height="50dp"
            android:layout_gravity="center"
            android:gravity="center"
            android:text="@string/perform_action"
            android:textSize="18sp" />
            -->

    </androidx.constraintlayout.widget.ConstraintLayout>

</ScrollView>