<!--
  TimeLimit Copyright <C> 2019 - 2022 Jonas Lochmann
  This program 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 version 3 of the License.

  This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
-->
<layout 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:context="io.timelimit.android.ui.setup.SetupLocalModeFragment">

    <data>
        <import type="io.timelimit.android.BuildConfig" />
        <import type="android.view.View" />
    </data>

    <ScrollView
        android:id="@+id/scroll"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <LinearLayout
            android:orientation="vertical"
            android:padding="8dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <include
                android:visibility="@{BuildConfig.hasServer ? View.VISIBLE : View.GONE}"
                android:id="@+id/network_time_verification"
                layout="@layout/setup_network_time_verification" />

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

            <androidx.cardview.widget.CardView
                app:cardUseCompatPadding="true"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
                <LinearLayout
                    android:padding="8dp"
                    android:orientation="vertical"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">

                    <TextView
                        android:textAppearance="?android:textAppearanceMedium"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:text="@string/setup_local_mode_explaination" />

                    <io.timelimit.android.ui.view.SetPasswordView
                        android:id="@+id/set_password_view"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content" />

                </LinearLayout>
            </androidx.cardview.widget.CardView>

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

            <Button
                android:layout_marginEnd="4dp"
                android:layout_gravity="end"
                android:text="@string/wiazrd_next"
                android:id="@+id/next_btn"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />

        </LinearLayout>
    </ScrollView>
</layout>
