<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/white_bg">

    <androidx.cardview.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:cardElevation="5dp">

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginHorizontal="15dp"
            android:gravity="center_vertical"
            android:layout_marginTop="15dp"
            android:layout_marginBottom="5dp"
            android:orientation="horizontal">

            <ImageView
                android:id="@+id/back_btn"
                android:layout_width="25dp"
                android:layout_height="25dp"
                android:contentDescription="@string/back_button"
                android:padding="5dp"
                android:src="@drawable/arrow_back"/>

            <de.hdodenhof.circleimageview.CircleImageView
                android:id="@+id/receiver_image"
                android:layout_width="@dimen/_30sdp"
                android:layout_height="@dimen/_30sdp"
                tools:src="@drawable/static_3"
                android:layout_marginStart="5dp"
                android:visibility="gone"
                />

            <TextView
                android:id="@+id/chat_title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"

                tools:text="Akanksha surve"
                android:fontFamily="@font/nunito_medium"
                android:textSize="@dimen/_18ssp"
                android:textColor="@color/black"

                android:layout_marginStart="10dp"

                android:maxLines="1"
                android:ellipsize="end"

                android:maxEms="8"

                />

        </LinearLayout>

    </androidx.cardview.widget.CardView>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <ProgressBar
            android:id="@+id/progress_bar"
            android:visibility="gone"
            android:layout_width="25dp"
            android:layout_height="25dp"

            android:layout_marginTop="5dp"
            android:layout_centerHorizontal="true"
            />

        <LinearLayout
            android:id="@+id/no_chats"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_above="@id/message_et"
            android:visibility="gone"
            android:gravity="center"
            android:orientation="vertical">

            <ImageView
                android:layout_width="@dimen/_60sdp"
                android:layout_height="@dimen/_60sdp"
                android:src="@drawable/ic_no_chats"
               />

            <TextView
                android:id="@+id/no_chat_msg"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="15dp"
                android:textAlignment="center"

                android:text="@string/no_chats_found_start_chatting"
                android:fontFamily="@font/nunito_medium"
                android:textColor="@color/black"
                android:textAppearance="@style/TextAppearance.Material3.TitleMedium"

                />

        </LinearLayout>

        <com.stfalcon.chatkit.messages.MessagesList
            android:id="@+id/messageList"
            android:layout_below="@id/progress_bar"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_above="@id/message_et"

            app:outcomingDefaultBubbleColor="#043E61"
            app:outcomingTextColor="@color/white_bg"
            app:outcomingTimeTextColor="@color/white"

            app:outcomingBubblePaddingBottom="10dp"
            app:outcomingBubblePaddingLeft="15dp"
            app:outcomingBubblePaddingRight="15dp"
            app:outcomingBubblePaddingTop="10dp"

            />

        <EditText
            android:id="@+id/message_et"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginStart="15dp"
            android:layout_marginVertical="10dp"
            android:layout_toStartOf="@id/btn_view"
            android:autofillHints="@null"
            android:background="@drawable/edit_text_bg_2"

            android:drawableStart="@drawable/ic_smiley_outline"
            android:drawablePadding="15dp"

            android:fontFamily="@font/nunito_regular"

            android:hint="@string/type_a_message"
            android:inputType="textMultiLine|textCapSentences|textLongMessage"

            android:maxHeight="@dimen/_100sdp"

            android:padding="15dp"

            android:paddingVertical="15dp"

            android:layout_alignParentBottom="true"

            android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
            android:textColor="@color/black"
            android:textColorHint="@android:color/darker_gray" />

        <RelativeLayout
            android:id="@+id/btn_view"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentEnd="true"
            android:layout_alignParentBottom="true"
            android:layout_centerVertical="true"
            >

            <com.google.android.material.button.MaterialButton
                android:id="@+id/send_btn"
                android:layout_width="wrap_content"
                android:layout_height="65dp"

                android:enabled="false"

                android:layout_marginVertical="5dp"
                android:layout_marginEnd="15dp"

                android:layout_centerInParent="true"

                android:fontFamily="@font/nunito_regular"
                android:textColor="@color/white_bg"

                app:backgroundTint="@color/color_primary"

                app:cornerRadius="5dp"

                />

            <ProgressBar
                android:id="@+id/send_progress"
                android:layout_width="25dp"
                android:layout_height="25dp"

                android:layout_centerInParent="true"
                android:translationZ="15dp"

                android:indeterminate="true"
                android:indeterminateTint="@color/white"
                />

        </RelativeLayout>

    </RelativeLayout>

</LinearLayout>