<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Nextcloud Talk - Android Client
  ~
  ~ SPDX-FileCopyrightText: 2024 Sowjanya Kota <sowjanya.kch@gmail.com>
  ~ SPDX-License-Identifier: GPL-3.0-or-later
-->

<RelativeLayout 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/cardView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginLeft="16dp"
    android:layout_marginTop="2dp"
    android:layout_marginRight="16dp"
    android:layout_marginBottom="2dp">

    <com.google.android.flexbox.FlexboxLayout
        android:id="@id/bubble"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentEnd="true"
        android:layout_marginStart="@dimen/message_outcoming_bubble_margin_left"
        app:alignContent="stretch"
        app:alignItems="stretch"
        app:flexWrap="wrap"
        app:justifyContent="flex_end">

        <include
            android:id="@+id/message_quote"
            layout="@layout/item_message_quote"
            android:visibility="gone" />

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

            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginBottom="4dp"
                android:gravity="center_vertical"
                android:orientation="horizontal">

                <ImageView
                    android:id="@+id/deckCardImage"
                    android:layout_width="16dp"
                    android:layout_height="16dp"
                    android:contentDescription="@null"
                    android:src="@drawable/deck" />

                <androidx.emoji2.widget.EmojiTextView
                    android:id="@+id/cardName"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="4dp"
                    android:ellipsize="end"
                    android:maxLines="1"
                    android:textIsSelectable="false"
                    android:textStyle="bold"
                    android:visibility="gone"
                    tools:text="Card Name"
                    tools:visibility="visible" />
            </LinearLayout>

            <androidx.emoji2.widget.EmojiTextView
                android:id="@+id/cardDescription"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:ellipsize="end"
                android:maxLines="1"
                android:textAlignment="viewStart"
                android:textIsSelectable="false"
                android:visibility="gone"
                tools:text="Card Description"
                tools:visibility="visible" />

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layout_marginTop="4dp"
            android:layout_gravity="end"
            tools:ignore="UseCompoundDrawables">

            <TextView
                android:id="@id/messageTime"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:alpha="0.6"
                android:textColor="@color/no_emphasis_text"
                android:textIsSelectable="false"
                tools:text="12:38" />
            <ImageView
                android:id="@+id/checkMark"
                android:layout_width="wrap_content"
                android:layout_height="@dimen/message_bubble_checkmark_height"
                android:layout_marginStart="4dp"
                android:contentDescription="@null"
                app:tint="@color/high_emphasis_text" />
        </LinearLayout>

        </LinearLayout>

        <include
            android:id="@+id/reactions"
            layout="@layout/reactions_inside_message" />

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