<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView 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/group_media_card"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:cardBackgroundColor="?android:attr/windowBackground"
    app:cardCornerRadius="0dp"
    app:cardElevation="0dp"
    tools:viewBindingIgnore="true">


    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingStart="@dimen/dsl_settings_gutter"
        android:paddingTop="12dp"
        android:paddingEnd="@dimen/dsl_settings_gutter"
        android:paddingBottom="12dp">

        <org.thoughtcrime.securesms.components.AvatarImageView
            android:id="@+id/message_details_recipient_avatar"
            android:layout_width="40dp"
            android:layout_height="40dp"
            android:layout_marginEnd="16dp"
            android:contentDescription="@string/SingleContactSelectionActivity_contact_photo"
            android:cropToPadding="true"
            android:foreground="@drawable/contact_photo_background"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toStartOf="@+id/message_details_recipient_name"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            tools:src="@tools:sample/avatars" />

        <org.thoughtcrime.securesms.badges.BadgeImageView
            android:id="@+id/message_details_recipient_badge"
            android:layout_width="24dp"
            android:layout_height="24dp"
            android:layout_marginStart="20dp"
            android:layout_marginTop="22dp"
            android:contentDescription="@string/ImageView__badge"
            app:badge_size="medium"
            app:layout_constraintStart_toStartOf="@id/message_details_recipient_avatar"
            app:layout_constraintTop_toTopOf="@id/message_details_recipient_avatar" />

        <org.thoughtcrime.securesms.components.FromTextView
            android:id="@+id/message_details_recipient_name"
            style="@style/Signal.Text.BodyLarge"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginEnd="4dp"
            android:ellipsize="marquee"
            android:singleLine="true"
            android:textColor="?attr/colorOnSurface"
            app:layout_constraintBottom_toTopOf="@+id/message_details_recipient_error_description"
            app:layout_constraintEnd_toStartOf="@+id/message_details_recipient_ud_indicator"
            app:layout_constraintStart_toEndOf="@+id/message_details_recipient_avatar"
            app:layout_constraintTop_toTopOf="parent"
            tools:text="Jules Bonnot" />

        <TextView
            android:id="@+id/message_details_recipient_error_description"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="#FFF44336"
            android:visibility="gone"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="@+id/message_details_recipient_name"
            app:layout_constraintTop_toBottomOf="@+id/message_details_recipient_name"
            tools:text="New identity"
            tools:visibility="gone" />

        <TextView
            android:id="@+id/message_details_recipient_timestamp"
            style="@style/Signal.Text.BodyMedium"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="?attr/colorOnSurfaceVariant"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@+id/message_details_recipient_conflict_button"
            app:layout_constraintTop_toTopOf="parent"
            tools:text="1:32 pm" />

        <com.google.android.material.button.MaterialButton
            android:id="@+id/message_details_recipient_conflict_button"
            style="@style/Signal.Widget.Button.Medium.Tonal"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:drawableStart="@drawable/symbol_error_circle_fill_16"
            android:text="@string/message_recipients_list_item__view"
            android:textColor="?attr/colorOnPrimary"
            android:visibility="gone"
            app:backgroundTint="?attr/colorError"
            app:drawableTint="?attr/colorOnPrimary"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toStartOf="@+id/message_details_recipient_timestamp"
            app:layout_constraintStart_toEndOf="@+id/message_details_recipient_ud_indicator"
            app:layout_constraintTop_toTopOf="parent"
            tools:visibility="gone" />

        <androidx.appcompat.widget.AppCompatImageView
            android:id="@+id/message_details_recipient_ud_indicator"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="4dp"
            android:layout_marginEnd="9dp"
            android:tint="?attr/colorOnSurfaceVariant"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toStartOf="@+id/message_details_recipient_conflict_button"
            app:layout_constraintStart_toEndOf="@+id/message_details_recipient_name"
            app:layout_constraintTop_toTopOf="parent"
            app:srcCompat="@drawable/ic_unidentified_delivery" />

    </androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>