<?xml version="1.0" encoding="utf-8"?><!--
    Copyright 2019 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.coordinatorlayout.widget.CoordinatorLayout 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="match_parent"
    android:layout_marginStart="@dimen/activity_horizontal_margin"
    android:layout_marginEnd="@dimen/activity_horizontal_margin"
    android:fitsSystemWindows="true"
    tools:context="app.fedilab.android.activities.AccountReportActivity">

    <com.google.android.material.appbar.AppBarLayout
        android:id="@+id/appBar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

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

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

            <Button
                android:id="@+id/assign"
                style="@style/colored_button"
                android:layout_width="0dp"
                android:layout_height="50dp"
                android:textSize="16sp"
                app:layout_constraintEnd_toStartOf="@id/status"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <Button
                android:id="@+id/status"
                style="@style/colored_button"
                android:layout_width="0dp"
                android:layout_height="50dp"
                android:textSize="16sp"
                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" />

            <TextView
                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" />

            <TextView
                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" />

            <TextView
                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" />

            <TextView
                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" />

            <TextView
                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" />

            <TextView
                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" />

            <TextView
                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" />

            <TextView
                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" />

            <TextView
                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" />

            <TextView
                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" />

            <TextView
                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" />

            <TextView
                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" />

            <TextView
                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" />

            <TextView
                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" />

            <Button
                android:id="@+id/reject"
                style="@style/colored_button"
                android:layout_width="0dp"
                android:layout_height="50dp"
                android:layout_marginTop="20dp"
                android:text="@string/reject"
                android:textSize="16sp"
                app:layout_constraintEnd_toStartOf="@id/allow"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/stats_bottom_barrier" />

            <Button
                android:id="@+id/allow"
                style="@style/colored_button"
                android:layout_width="0dp"
                android:layout_height="50dp"
                android:layout_marginTop="20dp"
                android:text="@string/allow"
                android:textSize="16sp"
                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" />

            <Button
                android:id="@+id/warn"
                style="@style/colored_button"
                android:layout_width="0dp"
                android:layout_height="50dp"
                android:layout_marginTop="20dp"
                android:text="@string/warn"
                android:textSize="16sp"
                app:layout_constraintEnd_toStartOf="@id/disable"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/allow_reject_buttons_barrier" />

            <Button
                android:id="@+id/disable"
                style="@style/colored_button"
                android:layout_width="0dp"
                android:layout_height="50dp"
                android:layout_marginTop="20dp"
                android:text="@string/disable"
                android:textSize="16sp"
                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" />

            <Button
                android:id="@+id/silence"
                style="@style/colored_button"
                android:layout_width="0dp"
                android:layout_height="50dp"
                android:layout_marginTop="5dp"
                android:text="@string/silence"
                android:textSize="16sp"
                app:layout_constraintEnd_toStartOf="@id/suspend"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/warn_disable_buttons_barrier" />

            <Button
                android:id="@+id/suspend"
                style="@style/colored_button"
                android:layout_width="0dp"
                android:layout_height="50dp"
                android:layout_marginTop="5dp"
                android:text="@string/suspend"
                android:textSize="16sp"
                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" />

            <CheckBox
                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" />

            <TextView
                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" />

            <EditText
                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>

</androidx.coordinatorlayout.widget.CoordinatorLayout>