<?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"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <include
        android:id="@+id/toolbar"
        layout="@layout/toolbar"
        app:layout_constraintTop_toTopOf="parent" />

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:fillViewport="true"
        app:layout_constraintTop_toBottomOf="@id/toolbar">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/fields_default_space_medium"
            android:orientation="vertical">


            <ch.protonmail.android.views.SettingsDefaultItemView
                android:id="@+id/autoLockContainer"
                style="@style/SettingsItemPadding"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:clickable="true"
                android:minHeight="50dp"
                app:hasValue="true"
                app:settingType="toggle"
                app:settingsHeading="@string/auto_lock_app"
                app:settingsValue="@string/auto_lock_description" />

            <LinearLayout
                android:id="@+id/autoLockOtherSettingsContainer"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:visibility="gone"
                android:orientation="vertical">

                <ch.protonmail.android.views.SettingsDefaultItemView
                    android:id="@+id/changePinCode"
                    style="@style/SettingsItemPadding"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:clickable="true"
                    android:minHeight="50dp"
                    app:hasValue="false"
                    app:settingType="drill"
                    app:settingsHeading="@string/change_pin_code" />

                <ch.protonmail.android.views.SettingsDefaultItemView
                    android:id="@+id/autoLockTimer"
                    style="@style/SettingsItemPadding"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:clickable="true"
                    android:minHeight="50dp"
                    app:hasValue="false"
                    app:settingType="spinner"
                    app:settingsHeading="@string/auto_lock_timer" />


                <ch.protonmail.android.views.SettingsDefaultItemView
                    android:id="@+id/useFingerprint"
                    style="@style/SettingsItemPadding"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:clickable="true"
                    android:minHeight="50dp"
                    app:hasValue="false"
                    app:settingType="toggle"
                    app:settingsHeading="@string/unlock_using_biometrics"
                    app:settingsValue="@string/biometric_error_hw_not_available" />
            </LinearLayout>
        </LinearLayout>
    </ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
