<?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"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:padding="24dp">

    <TextView
        android:id="@+id/tvCaption"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:labelFor="@+id/etLink"
        android:text="@string/title_open_link"
        android:textAppearance="@style/TextAppearance.AppCompat.Large"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <TextView
        android:id="@+id/tvTitle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="24dp"
        android:labelFor="@+id/etLink"
        android:text="Link title"
        android:textAppearance="@style/TextAppearance.AppCompat.Medium"
        android:textStyle="italic"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/tvCaption" />

    <EditText
        android:id="@+id/etLink"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="12dp"
        android:imeOptions="actionDone"
        android:inputType="textUri|textMultiLine"
        android:text="https://email.faircode.eu/"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/tvTitle">

        <requestFocus />
    </EditText>

    <TextView
        android:id="@+id/tvDifferent"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="24dp"
        android:labelFor="@+id/etLink"
        android:text="@string/title_different_link"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textColor="?attr/colorWarning"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/etLink" />

    <CheckBox
        android:id="@+id/cbSecure"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="12dp"
        android:text="@string/title_secure_link"
        android:textColor="?attr/colorWarning"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/tvDifferent" />

    <CheckBox
        android:id="@+id/cbSanitize"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="12dp"
        android:text="@string/title_sanitize_link"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/cbSecure" />

    <Button
        android:id="@+id/btnOwner"
        style="@style/buttonStyleSmall"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="12dp"
        android:minWidth="0dp"
        android:minHeight="0dp"
        android:text="@string/title_check_owner"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/cbSanitize" />

    <eu.faircode.email.ContentLoadingProgressBar
        android:id="@+id/pbWait"
        style="@style/Base.Widget.AppCompat.ProgressBar"
        android:layout_width="24dp"
        android:layout_height="24dp"
        android:layout_marginStart="12dp"
        android:indeterminate="true"
        app:layout_constraintBottom_toBottomOf="@id/btnOwner"
        app:layout_constraintStart_toEndOf="@id/btnOwner"
        app:layout_constraintTop_toTopOf="@id/btnOwner" />

    <TextView
        android:id="@+id/tvOwnerRemark"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/title_remark_owner"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textStyle="italic"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/btnOwner" />

    <TextView
        android:id="@+id/tvOwnerTitle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="12dp"
        android:labelFor="@+id/etLink"
        android:text="@string/title_ip_owner"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/tvOwnerRemark" />

    <TextView
        android:id="@+id/tvHost"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="example.org"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textColor="?android:textColorPrimary"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/tvOwnerTitle" />

    <TextView
        android:id="@+id/tvOwner"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:labelFor="@+id/etLink"
        android:text="Cloudflare"
        android:textAppearance="@style/TextAppearance.AppCompat.Medium"
        android:textColor="?android:textColorPrimary"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/tvHost" />

    <androidx.constraintlayout.widget.Group
        android:id="@+id/grpOwner"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:constraint_referenced_ids="tvOwnerTitle,tvHost,tvOwner" />
</androidx.constraintlayout.widget.ConstraintLayout>