<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (c) 2022 Proton AG
  ~
  ~ This file is part of Proton Mail.
  ~
  ~ Proton Mail 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.
  ~
  ~ Proton Mail 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 Proton Mail. If not, see https://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"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/background_norm"
    android:minWidth="@dimen/manage_labels_min_width"
    android:padding="@dimen/padding_l">

    <ImageView
        android:id="@+id/dialog_group_recipients_group_icon_image_view"
        android:layout_width="@dimen/size_icon_l"
        android:layout_height="@dimen/size_icon_l"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:srcCompat="@drawable/ic_proton_users" />

    <TextView
        android:id="@+id/dialog_group_recipients_group_name_text_view"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        app:layout_constraintTop_toTopOf="@id/dialog_group_recipients_group_icon_image_view"
        app:layout_constraintBottom_toBottomOf="@id/dialog_group_recipients_group_icon_image_view"
        app:layout_constraintStart_toEndOf="@id/dialog_group_recipients_group_icon_image_view"
        app:layout_constraintEnd_toEndOf="parent"
        android:layout_marginStart="@dimen/padding_l"
        android:ellipsize="end"
        android:maxLines="1"
        android:textAppearance="@style/ProtonTextView.Title"
        android:textSize="20sp"
        tools:text="Group 1"/>

    <me.proton.core.presentation.ui.view.ProtonCheckbox
        android:id="@+id/dialog_group_recipients_select_all_checkbox"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintTop_toBottomOf="@id/dialog_group_recipients_group_icon_image_view"
        app:layout_constraintEnd_toEndOf="parent"
        android:text="@string/select_deselect_all"/>

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/dialog_group_recipients_recycler_view"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:layout_constraintTop_toBottomOf="@id/dialog_group_recipients_select_all_checkbox"
        app:layout_constraintBottom_toTopOf="@id/dialog_group_recipients_apply_button"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintVertical_bias="0"
        android:layout_marginVertical="@dimen/padding_m"
        android:divider="@null" />

    <TextView
        android:id="@+id/dialog_group_recipients_no_recipients_text_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintTop_toBottomOf="@id/dialog_group_recipients_select_all_checkbox"
        app:layout_constraintBottom_toTopOf="@id/dialog_group_recipients_apply_button"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        android:text="@string/no_recipients"
        android:textAppearance="@style/Proton.Text.Default.Weak"
        android:textColor="@color/text_weak"
        android:visibility="gone"
        tools:visibility="visible"/>

    <me.proton.core.presentation.ui.view.ProtonButton
        android:id="@+id/dialog_group_recipients_apply_button"
        style="@style/ProtonButton.Borderless.Text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        android:text="@string/label_apply" />

    <me.proton.core.presentation.ui.view.ProtonButton
        android:id="@+id/dialog_group_recipients_cancel_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="@dimen/padding_m"
        style="@style/ProtonButton.Borderless.Text"
        app:layout_constraintEnd_toStartOf="@id/dialog_group_recipients_apply_button"
        app:layout_constraintBottom_toBottomOf="parent"
        android:textColor="?attr/colorError"
        android:text="@string/cancel" />

</androidx.constraintlayout.widget.ConstraintLayout>
