<?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:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingLeft="16dp"
    android:paddingRight="16dp">

    <ImageView
        android:id="@+id/imageView"
        android:layout_width="145dp"
        android:layout_height="148dp"
        android:layout_marginTop="32dp"
        android:contentDescription="@string/img_http_sms_logo"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.498"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:srcCompat="@drawable/logo_cropped"
        tools:ignore="ImageContrastCheck" />

    <TextView
        android:id="@+id/textView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="20dp"
        android:autoLink="web"
        android:lineHeight="28sp"
        android:text="@string/get_your_api_key"
        android:textAlignment="center"
        android:textSize="20sp"
        app:layout_constraintBottom_toTopOf="@+id/loginApiKeyTextInputLayout"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.498"
        app:layout_constraintStart_toStartOf="parent" />

    <com.google.android.material.textfield.TextInputLayout
        android:id="@+id/loginApiKeyTextInputLayout"
        style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:errorEnabled="true"
        android:hint="@string/text_area_api_key"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        tools:layout_editor_absoluteX="16dp">

        <com.google.android.material.textfield.TextInputEditText
            android:id="@+id/loginApiKeyTextInput"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:inputType="textMultiLine"
            tools:ignore="TextContrastCheck" />

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

    <com.google.android.material.textfield.TextInputLayout
        android:id="@+id/loginPhoneNumberLayout"
        style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="224dp"
        android:hint="@string/phone_number"
        app:errorEnabled="true"
        app:placeholderText="@string/login_phone_number_hint"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/loginApiKeyTextInputLayout"
        app:layout_constraintVertical_bias="0.137"
        tools:layout_editor_absoluteX="16dp">

        <com.google.android.material.textfield.TextInputEditText
            android:id="@+id/loginPhoneNumberInput"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:inputType="textMultiLine"
            tools:ignore="TextContrastCheck" />

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


    <com.google.android.material.textfield.TextInputLayout
        android:id="@+id/loginServerUrlLayout"
        style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="-24dp"
        android:hint="@string/server_url"
        app:errorEnabled="true"
        app:placeholderText="@string/login_server_url_hint"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/loginPhoneNumberLayout"
        app:layout_constraintVertical_bias="0.137"
        tools:layout_editor_absoluteX="16dp">

        <com.google.android.material.textfield.TextInputEditText
            android:id="@+id/loginServerUrlInput"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:inputType="textMultiLine"
            tools:ignore="TextContrastCheck" />

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

    <LinearLayout
        android:id="@+id/linearLayout"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="50"
        android:orientation="vertical"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/loginServerUrlLayout">

        <com.google.android.material.button.MaterialButton
            android:id="@+id/loginButton"
            style="@style/Widget.MaterialComponents.Button.Icon"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:backgroundTint="#2196f3"
            android:drawableTint="@color/white"
            android:padding="10dp"
            android:text="@string/sign_in_button"
            android:textColor="@color/white"
            android:textSize="16sp"
            app:icon="@drawable/ic_login"
            app:iconTint="@color/white"
            tools:ignore="TextContrastCheck" />

        <com.google.android.material.progressindicator.LinearProgressIndicator
            android:id="@+id/loginProgressIndicator"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="4dp"
            android:indeterminate="true"
            android:visibility="invisible"
            app:indicatorColor="@color/pink_500"
            app:layout_constraintTop_toBottomOf="@+id/loginButton"
            tools:layout_editor_absoluteX="16dp" />
    </LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>
