<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    tools:viewBindingIgnore="true"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/quote_container"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_margin="3dp"
    android:visibility="gone"
    tools:parentTag="android.widget.FrameLayout"
    tools:visibility="visible">

    <LinearLayout
        android:id="@+id/quote_background"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">

        <View
            android:id="@+id/quote_bar"
            android:layout_width="@dimen/quote_corner_radius_bottom"
            android:layout_height="match_parent"
            tools:background="@color/purple_400" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <LinearLayout
                android:id="@+id/quote_main"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="8dp"
                    android:layout_marginTop="8dp"
                    android:layout_marginEnd="8dp"
                    android:layout_marginBottom="8dp"
                    android:layout_weight="1"
                    android:orientation="vertical">

                    <org.thoughtcrime.securesms.components.emoji.EmojiTextView
                        android:id="@+id/quote_author"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:ellipsize="end"
                        android:maxLines="1"
                        android:textAppearance="@style/Signal.Text.LabelLarge"
                        android:textColor="@color/core_black"
                        tools:text="Peter Parker" />

                    <LinearLayout
                        android:id="@+id/quote_attachment_container"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginBottom="2dp"
                        android:gravity="center_vertical"
                        android:orientation="horizontal"
                        android:visibility="gone"
                        tools:visibility="visible">

                        <ImageView
                            android:layout_width="27dp"
                            android:layout_height="35dp"
                            android:layout_marginEnd="4dp"
                            android:paddingStart="-4dp"
                            android:src="@drawable/ic_document_small" />

                        <TextView
                            android:id="@+id/quote_attachment_name"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:ellipsize="end"
                            android:maxLines="1"
                            android:textAppearance="@style/Signal.Text.BodyMedium"
                            android:textColor="@color/core_grey_90"
                            tools:text="The-Amazing-Spider-Man.cba" />

                    </LinearLayout>

                    <TextView
                        android:id="@+id/media_type"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginEnd="8dp"
                        android:paddingTop="4dp"
                        android:textAppearance="@style/Signal.Text.BodyMedium"
                        android:textColor="@color/core_black"
                        android:visibility="gone"
                        tools:text="Photo"
                        tools:visibility="visible" />

                    <org.thoughtcrime.securesms.components.emoji.EmojiTextView
                        android:id="@+id/quote_text"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:ellipsize="end"
                        android:maxLines="2"
                        android:textAppearance="@style/Signal.Text.BodyMedium"
                        app:emoji_renderMentions="false"
                        tools:text="With great power comes great responsibility."
                        tools:visibility="visible" />

                </LinearLayout>

                <org.thoughtcrime.securesms.components.emoji.EmojiImageView
                    android:id="@+id/quote_missing_story_reaction_emoji"
                    android:layout_width="32dp"
                    android:layout_height="32dp"
                    android:layout_gravity="center_vertical"
                    android:layout_marginStart="12dp"
                    android:layout_marginEnd="8dp"
                    android:visibility="gone"
                    tools:src="@drawable/ic_emoji"
                    tools:visibility="visible" />

                <FrameLayout
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:background="@color/white">

                    <com.google.android.material.imageview.ShapeableImageView
                        android:id="@+id/quote_thumbnail"
                        android:layout_width="@dimen/quote_thumb_size"
                        android:layout_height="match_parent"
                        android:scaleType="centerCrop"
                        android:visibility="gone"
                        tools:visibility="visible" />

                    <FrameLayout
                        android:id="@+id/quote_video_overlay"
                        android:layout_width="32dp"
                        android:layout_height="32dp"
                        android:layout_gravity="center"
                        android:background="@drawable/circle_white"
                        android:longClickable="false"
                        android:visibility="gone"
                        tools:visibility="visible">

                        <androidx.appcompat.widget.AppCompatImageView
                            android:layout_width="13dp"
                            android:layout_height="16dp"
                            android:layout_gravity="center_horizontal"
                            android:layout_marginTop="8dp"
                            android:scaleType="fitXY"
                            android:tint="@color/core_ultramarine"
                            app:srcCompat="@drawable/exo_icon_play" />

                    </FrameLayout>

                </FrameLayout>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/quote_missing_footer"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:padding="8dp"
                android:visibility="gone"
                tools:visibility="visible">

                <androidx.appcompat.widget.AppCompatImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginEnd="8dp"
                    android:src="@drawable/ic_broken_link"
                    android:tint="@color/quote_missing_icon_color" />

                <TextView
                    android:id="@+id/quote_missing_text"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/QuoteView_original_missing"
                    android:textAppearance="@style/Signal.Text.MaterialCaption"
                    android:textColor="@color/core_grey_90" />

            </LinearLayout>


        </LinearLayout>
    </LinearLayout>

    <org.thoughtcrime.securesms.components.emoji.EmojiImageView
        android:id="@+id/quote_story_reaction_emoji"
        android:layout_width="32dp"
        android:layout_height="32dp"
        android:layout_gravity="bottom|end"
        android:layout_marginEnd="@dimen/quote_story_emoji_margin"
        android:visibility="gone"
        tools:src="@drawable/ic_emoji"
        tools:visibility="visible" />

    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/quote_dismiss"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:layout_gravity="top|end"
        android:background="@drawable/dismiss_background"
        app:srcCompat="@drawable/ic_x_20"
        app:tint="@color/signal_colorOnSurface" />

</merge>