<?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/.
  -->

<LinearLayout 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:orientation="vertical">

    <!-- Toolbar -->
    <com.google.android.material.appbar.MaterialToolbar
        android:id="@+id/set_msg_password_toolbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:title="@string/set_msg_password_title" />

    <!-- Body -->
    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:fillViewport="true">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingHorizontal="@dimen/padding_l"
            android:paddingVertical="@dimen/padding_xl">

            <!-- Info -->
            <ImageView
                android:id="@+id/set_msg_password_info_icon"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/padding_xs"
                android:contentDescription="@string/set_msg_password_info_icon_description"
                app:srcCompat="@drawable/ic_proton_info_circle"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="@id/set_msg_password_info_text_view"
                app:tint="@color/shade_80" />

            <TextView
                android:id="@+id/set_msg_password_info_text_view"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/padding_m"
                android:text="@string/set_msg_password_info"
                android:textAppearance="@style/Proton.Text.DefaultSmall.Weak"
                android:textColor="@color/text_weak"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toEndOf="@id/set_msg_password_info_icon"
                app:layout_constraintTop_toTopOf="parent" />

            <!-- Message password -->
            <me.proton.core.presentation.ui.view.ProtonInput
                android:id="@+id/set_msg_password_msg_password_input"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/padding_xl"
                android:hint="@string/set_msg_password_msg_password_hint"
                android:inputType="textPassword"
                app:actionMode="password_toggle"
                app:label="@string/set_msg_password_msg_password_title"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/set_msg_password_info_text_view" />

            <!-- Repeat password -->
            <me.proton.core.presentation.ui.view.ProtonInput
                android:id="@+id/set_msg_password_repeat_password_input"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/padding_m"
                android:hint="@string/set_msg_password_repeat_password_hint"
                android:inputType="textPassword"
                app:actionMode="password_toggle"
                app:label="@string/set_msg_password_repeat_password_title"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/set_msg_password_msg_password_input" />

            <!-- Hint -->
            <me.proton.core.presentation.ui.view.ProtonInput
                android:id="@+id/set_msg_password_hint_input"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/padding_m"
                android:hint="@string/set_msg_password_password_hint_hint"
                android:inputType="text"
                app:actionMode="clear_text"
                app:label="@string/set_msg_password_password_hint_title"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/set_msg_password_repeat_password_input" />

            <!-- Apply -->
            <me.proton.core.presentation.ui.view.ProtonButton
                android:id="@+id/set_msg_password_apply_button"
                style="@style/ProtonButton.Borderless.Text"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                app:layout_constraintTop_toBottomOf="@id/set_msg_password_hint_input"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                android:layout_marginTop="@dimen/padding_m"
                android:text="@string/set_msg_password_apply_password"
                android:enabled="false"/>

            <!-- Remove -->
            <me.proton.core.presentation.ui.view.ProtonButton
                style="@style/ProtonButton.OutlinedButton"
                android:id="@+id/set_msg_password_remove_button"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                app:layout_constraintTop_toBottomOf="@id/set_msg_password_apply_button"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                android:layout_marginTop="@dimen/padding_l"
                android:text="@string/set_msg_password_remove_password"
                android:textColor="?colorError"
                app:strokeColor="?colorError"
                android:enabled="false"/>

        </androidx.constraintlayout.widget.ConstraintLayout>

    </ScrollView>

</LinearLayout>
