<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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:id="@+id/connect_server_root"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/theme_background">

    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/logo"
        android:layout_width="72dp"
        android:layout_height="72dp"
        android:layout_marginTop="56dp"
        app:layout_constrainedHeight="true"
        app:layout_constraintEnd_toStartOf="@id/header_app_name"
        app:layout_constraintHorizontal_chainStyle="packed"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:srcCompat="@mipmap/ic_launcher" />

    <androidx.appcompat.widget.AppCompatTextView
        android:id="@+id/header_app_name"
        style="@style/TextAppearance.AppCompat.Display2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:fontFamily="@font/quicksand"
        android:text="@string/app_name"
        android:textColor="@color/logo_text_color"
        app:layout_constraintBottom_toBottomOf="@id/logo"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/logo"
        app:layout_constraintTop_toTopOf="@id/logo"
        app:layout_constraintVertical_bias="0.1" />

    <androidx.appcompat.widget.AppCompatTextView
        android:id="@+id/connect_title"
        style="@style/TextAppearance.AppCompat.Headline"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginTop="56dp"
        android:layout_marginEnd="16dp"
        android:text="@string/connect_to_server_title"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/logo" />

    <EditText
        android:id="@+id/host_input"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginTop="8dp"
        android:layout_marginEnd="16dp"
        android:hint="@string/host_input_hint"
        android:importantForAutofill="no"
        android:inputType="textUri"
        android:maxLines="1"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/connect_title" />

    <TextView
        android:id="@+id/connection_error_text"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginTop="8dp"
        android:layout_marginEnd="16dp"
        android:fontFamily="sans-serif-medium"
        android:textColor="@color/error_text_color"
        android:visibility="gone"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/host_input"
        tools:text="@string/connection_error_cannot_connect"
        tools:visibility="visible" />

    <Button
        android:id="@+id/connect_button"
        style="@style/Widget.AppCompat.Button.Colored"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="8dp"
        android:text="@string/connect_button_text"
        android:textColor="@android:color/white"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/connection_error_text" />

    <Button
        android:id="@+id/choose_server_button"
        style="@style/Widget.AppCompat.Button.Colored"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="8dp"
        android:text="@string/choose_server_button_text"
        android:textColor="@android:color/white"
        android:visibility="gone"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/connect_button"
        tools:visibility="visible" />
</androidx.constraintlayout.widget.ConstraintLayout>
