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

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

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <TextView
            android:id="@+id/description"
            style="@style/Proton.Text.DefaultSmall.Weak"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/padding_xl"
            android:layout_marginBottom="@dimen/padding_xl"
            android:paddingStart="@dimen/padding_l"
            android:paddingEnd="@dimen/padding_l"
            android:text="@string/attachment_offline_max_storage" />


        <TextView
            style="@style/Proton.Text.Default"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="@dimen/padding_l"
            android:paddingStart="@dimen/padding_l"
            android:paddingEnd="@dimen/padding_l"
            android:text="@string/storage_limit" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingStart="@dimen/padding_l"
                android:paddingEnd="@dimen/padding_l">

                <TextView
                    style="@style/Proton.Text.DefaultSmall.Weak"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentStart="true"
                    android:text="200MB" />

                <TextView
                    style="@style/Proton.Text.DefaultSmall.Weak"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentEnd="true"
                    android:text="@string/unlimited" />
            </RelativeLayout>

            <com.google.android.material.slider.Slider
                android:id="@+id/attachment_storage_value"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/padding_m"
                android:layout_marginEnd="@dimen/padding_m"
                android:stepSize="200"
                android:valueFrom="200"
                android:valueTo="1200" />
        </LinearLayout>

        <TextView
            android:id="@+id/storage_text_value"
            style="@style/Proton.Text.DefaultSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="@dimen/padding_l"
            android:paddingStart="@dimen/padding_l"
            android:paddingEnd="@dimen/padding_l" />


        <View style="@style/ViewSeparatorHorizontal"/>

        <RelativeLayout
            android:id="@+id/clear_cache_container"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="@dimen/padding_l">

            <Button
                android:id="@+id/clear_local_cache"
                style="@style/ProtonButton"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentEnd="true"
                android:maxLines="1"
                android:text="@string/empty_data" />

            <TextView
                style="@style/Proton.Text.Default"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:layout_toStartOf="@id/clear_local_cache"
                android:text="@string/local_cache_management" />
        </RelativeLayout>

        <View style="@style/ViewSeparatorHorizontal"/>
    </LinearLayout>
</LinearLayout>
