<!--
  ~ Nextcloud Talk - Android Client
  ~
  ~ SPDX-FileCopyrightText: 2020 Infomaniak Network SA
  ~ SPDX-License-Identifier: GPL-3.0-or-later
-->
<androidx.constraintlayout.widget.ConstraintLayout 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"
    tools:background="@color/white"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <include
        android:id="@+id/current_account"
        layout="@layout/current_account_item"
        android:layout_width="0dp"
        android:layout_height="72dp"
        android:layout_margin="4dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <LinearLayout
        android:id="@+id/statusView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:paddingStart="@dimen/standard_half_padding"
        android:paddingEnd="@dimen/zero"
        android:visibility="gone"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/current_account"
        tools:visibility="visible">

        <com.google.android.material.button.MaterialButton
            android:id="@+id/online_status"
            style="@style/Nextcloud.Material.TextButton"
            android:layout_width="wrap_content"
            android:layout_height="60dp"
            android:layout_weight="1"
            android:enabled="false"
            android:padding="@dimen/zero"
            android:paddingStart="@dimen/standard_half_padding"
            android:paddingEnd="@dimen/standard_half_padding"
            android:text="@string/online_status"
            android:textAlignment="textStart"
            android:textAllCaps="false"
            android:textColor="@color/high_emphasis_text"
            app:icon="@drawable/ic_check_circle_outlined"
            app:iconGravity="start"
            app:iconPadding="@dimen/standard_half_padding"
            app:iconTint="@color/high_emphasis_text" />

        <com.google.android.material.button.MaterialButton
            android:id="@+id/status_message"
            style="@style/Nextcloud.Material.TextButton"
            android:layout_width="wrap_content"
            android:layout_height="60dp"
            android:layout_weight="1"
            android:enabled="false"
            android:padding="@dimen/zero"
            android:paddingStart="@dimen/standard_half_padding"
            android:paddingEnd="@dimen/standard_half_padding"
            android:text="@string/status_message"
            android:textAlignment="textStart"
            android:textAllCaps="false"
            android:textColor="@color/high_emphasis_text"
            app:icon="@drawable/baseline_chat_bubble_outline_24"
            app:iconGravity="start"
            app:iconPadding="@dimen/standard_half_padding"
            app:iconTint="@color/high_emphasis_text" />

    </LinearLayout>

    <View
        android:id="@+id/divider"
        android:layout_width="0dp"
        android:layout_height="1dp"
        android:layout_marginTop="4dp"
        android:background="@color/list_divider_background"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/statusView" />

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/accounts_list"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginBottom="10dp"
        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
        app:layout_constrainedHeight="true"
        app:layout_constraintBottom_toTopOf="@+id/add_account"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/divider"
        tools:listitem="@layout/account_item" />

    <com.google.android.material.button.MaterialButton
        android:id="@+id/add_account"
        style="@style/Nextcloud.Material.TextButton"
        android:layout_width="0dp"
        android:layout_height="50dp"
        android:layout_marginStart="12dp"
        android:layout_marginEnd="12dp"
        android:paddingStart="18dp"
        android:paddingEnd="4dp"
        android:text="@string/nc_account_chooser_add_account"
        android:textAlignment="textStart"
        android:textAllCaps="false"
        android:textColor="@color/high_emphasis_text"
        app:icon="@drawable/ic_account_plus"
        app:iconGravity="start"
        app:iconPadding="22dp"
        app:iconTint="@color/high_emphasis_text"
        app:layout_constraintBottom_toTopOf="@+id/manage_settings"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

    <com.google.android.material.button.MaterialButton
        android:id="@+id/manage_settings"
        style="@style/Nextcloud.Material.TextButton"
        android:layout_width="0dp"
        android:layout_height="50dp"
        android:layout_marginStart="12dp"
        android:layout_marginEnd="12dp"
        android:layout_marginBottom="12dp"
        android:paddingStart="18dp"
        android:paddingEnd="4dp"
        android:text="@string/nc_settings"
        android:textAlignment="textStart"
        android:textAllCaps="false"
        android:textColor="@color/high_emphasis_text"
        app:icon="@drawable/ic_settings"
        app:iconGravity="start"
        app:iconPadding="22dp"
        app:iconTint="@color/high_emphasis_text"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>
