<?xml version="1.0" encoding="utf-8"?>
<org.thoughtcrime.securesms.conversation.v2.messages.QuoteView 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/mainQuoteViewContainer"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="?input_bar_background"
    android:minHeight="52dp"
    android:paddingVertical="12dp"
    android:paddingHorizontal="12dp"
    app:quote_mode="regular">

    <View
        android:id="@+id/quoteViewAccentLine"
        android:layout_width="@dimen/accent_line_thickness"
        android:layout_height="0dp"
        android:layout_marginVertical="2dp"
        android:background="?colorAccent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintHorizontal_bias="0"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <RelativeLayout
        tools:visibility="visible"
        android:id="@+id/quoteViewAttachmentPreviewContainer"
        android:layout_width="40dp"
        android:layout_height="40dp"
        android:layout_centerVertical="true"
        android:layout_marginVertical="@dimen/small_spacing"
        android:background="@drawable/view_quote_attachment_preview_background"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintHorizontal_bias="0"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <ImageView
            android:id="@+id/quoteViewAttachmentPreviewImageView"
            android:layout_width="20dp"
            android:layout_height="20dp"
            android:layout_centerInParent="true"
            android:scaleType="centerInside"
            android:src="@drawable/ic_microphone" />

        <include layout="@layout/thumbnail_view"
            android:id="@+id/quoteViewAttachmentThumbnailImageView"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:scaleType="centerCrop"
            android:visibility="gone" />

    </RelativeLayout>

    <androidx.constraintlayout.widget.Barrier
        android:id="@+id/quoteStartBarrier"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:orientation="vertical"
        app:barrierDirection="end"
        app:constraint_referenced_ids="quoteViewAttachmentPreviewContainer,quoteViewAccentLine" />

    <TextView
        android:id="@+id/quoteViewAuthorTextView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/medium_spacing"
        android:ellipsize="end"
        android:maxLines="1"
        android:textColor="?android:textColorPrimary"
        android:textSize="@dimen/small_font_size"
        android:textStyle="bold"
        android:maxWidth="240dp"
        app:layout_constraintBottom_toTopOf="@+id/quoteViewBodyTextView"
        app:layout_constraintHorizontal_bias="0"
        app:layout_constraintStart_toEndOf="@+id/quoteStartBarrier"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_chainStyle="packed"
        tools:text="@tools:sample/full_names" />

    <TextView
        android:id="@+id/quoteViewBodyTextView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/medium_spacing"
        android:ellipsize="end"
        android:maxLines="1"
        android:textColor="?android:textColorPrimary"
        android:textSize="@dimen/small_font_size"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintStart_toEndOf="@+id/quoteStartBarrier"
        app:layout_constraintTop_toBottomOf="@+id/quoteViewAuthorTextView"
        android:maxWidth="240dp"
        tools:maxLines="1"
        tools:text="@tools:sample/lorem/random" />

    <View
        android:id="@+id/quoteViewCancelButton"
        android:layout_width="32dp"
        android:layout_height="32dp"
        android:layout_marginStart="@dimen/small_spacing"
        android:layout_marginEnd="@dimen/small_spacing"
        android:padding="6dp"
        android:src="@drawable/ic_close_white_48dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:tint="?android:textColorPrimary"
        tools:visibility="gone" />

</org.thoughtcrime.securesms.conversation.v2.messages.QuoteView>