<FrameLayout 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">

    <me.zhanghai.android.materialprogressbar.MaterialProgressBar
        android:id="@+id/loginFormProgress"
        style="@style/Widget.MaterialProgressBar.ProgressBar"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:indeterminate="true"
        android:visibility="gone" />

    <androidx.core.widget.NestedScrollView
        android:id="@+id/nestedScrollView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fillViewport="true"
        android:scrollbars="none">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/loginFormContainer"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <LinearLayout
                android:id="@+id/loginFormContact"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:visibility="gone"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                tools:visibility="visible">

                <TextView
                    android:id="@+id/loginFormContactHeader"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="32dp"
                    android:layout_marginLeft="32dp"
                    android:layout_marginTop="16dp"
                    android:layout_marginEnd="32dp"
                    android:layout_marginRight="32dp"
                    android:layout_marginBottom="16dp"
                    android:gravity="center_horizontal"
                    android:text="@string/login_contact_header"
                    android:textSize="14sp"
                    app:fontFamily="sans-serif-medium" />

                <LinearLayout
                    android:id="@+id/loginFormContactButtons"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="16dp"
                    android:layout_marginRight="16dp"
                    android:orientation="horizontal">

                    <com.google.android.material.button.MaterialButton
                        android:id="@+id/loginFormContactEmail"
                        style="@style/Widget.MaterialComponents.Button.OutlinedButton"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_marginEnd="8dp"
                        android:layout_marginRight="8dp"
                        android:layout_weight="1"
                        android:text="@string/login_contact_email"
                        app:icon="@drawable/ic_more_messages" />

                    <com.google.android.material.button.MaterialButton
                        android:id="@+id/loginFormContactDiscord"
                        style="@style/Widget.MaterialComponents.Button.OutlinedButton"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="8dp"
                        android:layout_marginLeft="8dp"
                        android:layout_weight="1"
                        android:text="@string/login_contact_discord"
                        app:icon="@drawable/ic_about_discord" />
                </LinearLayout>

                <View
                    android:id="@+id/loginFormContactDivider"
                    android:layout_width="match_parent"
                    android:layout_height="1dp"
                    android:layout_marginTop="8dp"
                    android:background="?android:attr/listDivider" />
            </LinearLayout>

            <TextView
                android:id="@+id/loginFormHeader"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="32dp"
                android:layout_marginLeft="32dp"
                android:layout_marginTop="48dp"
                android:layout_marginEnd="32dp"
                android:layout_marginRight="32dp"
                android:gravity="center_horizontal"
                android:text="@string/login_header_default"
                android:textSize="16sp"
                app:fontFamily="sans-serif-light"
                app:layout_constraintBottom_toTopOf="@+id/loginFormNameLayout"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/loginFormContact"
                app:layout_constraintVertical_chainStyle="packed" />


            <com.google.android.material.textfield.TextInputLayout
                android:id="@+id/loginFormNameLayout"
                style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="24dp"
                android:layout_marginLeft="24dp"
                android:layout_marginTop="48dp"
                android:layout_marginEnd="24dp"
                android:layout_marginRight="24dp"
                android:hint="@string/login_nickname_hint"
                app:errorEnabled="true"
                app:layout_constraintBottom_toTopOf="@+id/loginFormPassLayout"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/loginFormHeader">

                <com.google.android.material.textfield.TextInputEditText
                    android:id="@+id/loginFormName"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:autofillHints="emailAddress"
                    android:inputType="textEmailAddress"
                    android:maxLines="1"
                    tools:targetApi="o" />

                <requestFocus />
            </com.google.android.material.textfield.TextInputLayout>

            <com.google.android.material.textfield.TextInputLayout
                android:id="@+id/loginFormPassLayout"
                style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="24dp"
                android:layout_marginLeft="24dp"
                android:layout_marginTop="8dp"
                android:layout_marginEnd="24dp"
                android:layout_marginRight="24dp"
                android:hint="@string/login_password_hint"
                app:errorEnabled="true"
                app:layout_constraintBottom_toTopOf="@+id/loginFormHostLayout"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/loginFormNameLayout"
                app:passwordToggleEnabled="true">

                <com.google.android.material.textfield.TextInputEditText
                    android:id="@+id/loginFormPass"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:autofillHints="password"
                    android:imeActionLabel="@string/login_sign_in"
                    android:imeOptions="actionDone"
                    android:inputType="textPassword"
                    android:maxLines="1"
                    app:fontFamily="sans-serif"
                    tools:targetApi="o" />

            </com.google.android.material.textfield.TextInputLayout>

            <com.google.android.material.textfield.TextInputLayout
                android:id="@+id/loginFormHostLayout"
                style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="24dp"
                android:layout_marginLeft="24dp"
                android:layout_marginTop="16dp"
                android:layout_marginEnd="24dp"
                android:layout_marginRight="24dp"
                android:hint="@string/login_host_hint"
                android:orientation="vertical"
                app:layout_constraintBottom_toTopOf="@+id/loginFormSignIn"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/loginFormPassLayout">

                <AutoCompleteTextView
                    android:id="@+id/loginFormHost"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:editable="false"
                    tools:ignore="Deprecated,LabelFor" />
            </com.google.android.material.textfield.TextInputLayout>

            <com.google.android.material.button.MaterialButton
                android:id="@+id/loginFormSignIn"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical"
                android:layout_marginTop="48dp"
                android:layout_marginBottom="32dp"
                android:text="@string/login_sign_in"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="@id/loginFormHostLayout"
                app:layout_constraintTop_toBottomOf="@+id/loginFormHostLayout" />

            <TextView
                android:id="@+id/loginFormVersion"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginEnd="24dp"
                android:layout_marginRight="24dp"
                android:maxLines="2"
                android:textColor="?android:textColorSecondary"
                android:textSize="12sp"
                android:visibility="invisible"
                app:layout_constraintBottom_toBottomOf="@id/loginFormSignIn"
                app:layout_constraintEnd_toStartOf="@+id/loginFormSignIn"
                app:layout_constraintStart_toStartOf="@id/loginFormHostLayout"
                app:layout_constraintTop_toTopOf="@+id/loginFormSignIn"
                tools:text="Version 1.0.0" />

            <com.google.android.material.button.MaterialButton
                android:id="@+id/loginFormPrivacyLink"
                style="@style/Widget.MaterialComponents.Button.TextButton"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginEnd="24dp"
                android:layout_marginRight="24dp"
                android:gravity="start|center_vertical"
                android:text="@string/login_privacy_policy"
                android:visibility="invisible"
                app:fontFamily="sans-serif-medium"
                app:layout_constraintBottom_toBottomOf="@id/loginFormSignIn"
                app:layout_constraintEnd_toStartOf="@+id/loginFormSignIn"
                app:layout_constraintStart_toStartOf="@id/loginFormHostLayout"
                app:layout_constraintTop_toTopOf="@+id/loginFormSignIn"
                tools:visibility="visible" />
        </androidx.constraintlayout.widget.ConstraintLayout>
    </androidx.core.widget.NestedScrollView>
</FrameLayout>
