<?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="wrap_content"
    android:layout_margin="16dp"
    android:background="@drawable/rounded_outline"
    android:paddingVertical="24dp"
    android:paddingHorizontal="16dp"
    tools:viewBindingIgnore="true">

    <com.google.android.material.imageview.ShapeableImageView
        android:id="@+id/image"
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:scaleType="centerInside"
        android:importantForAccessibility="no"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:srcCompat="@drawable/permissions_contact_book" />

    <TextView
        android:id="@+id/title"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:layout_marginTop="20dp"
        android:text="@string/contact_selection_activity__find_people_you_know"
        android:textAppearance="@style/Signal.Text.BodyLarge"
        app:layout_constraintTop_toBottomOf="@id/image"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent" />

    <TextView
        android:id="@+id/description"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:text="@string/ContactSelectionListFragment__allow_access_to_your_contacts_encrypted"
        android:textAppearance="@style/Signal.Text.BodyMedium"
        android:textColor="?attr/colorOnSurfaceVariant"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.0"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/title" />

    <com.google.android.flexbox.FlexboxLayout
        android:id="@+id/permission_buttons"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toBottomOf="@id/description"
        android:layout_marginTop="4dp"
        android:layout_marginHorizontal="10dp"
        app:flexWrap="wrap_reverse">

        <com.google.android.material.button.MaterialButton
            android:id="@+id/no_thanks_button"
            style="@style/Signal.Widget.Button.Medium.Tonal"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:layout_marginHorizontal="6dp"
            android:minWidth="@dimen/contact_permission_button_min_width"
            android:text="@string/ContactSelectionListFragment__no_thanks"
            app:layout_flexGrow="1" />

        <com.google.android.material.button.MaterialButton
            android:id="@+id/allow_contacts_button"
            style="@style/Signal.Widget.Button.Medium.Tonal"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:layout_marginHorizontal="6dp"
            android:minWidth="@dimen/contact_permission_button_min_width"
            android:text="@string/ContactSelectionListFragment__allow_access"
            app:layout_flexGrow="1" />

    </com.google.android.flexbox.FlexboxLayout>

</androidx.constraintlayout.widget.ConstraintLayout>
