<?xml version="1.0" encoding="utf-8"?><!--
  ~ Nextcloud Talk application
  ~
  ~ @author Mario Danic
  ~ @author Andy Scherzinger
  ~ @author Julius Linus
  ~ Copyright (C) 2023 Julius Linus <juliuslinus1@gmail.com>
  ~ Copyright (C) 2021 Andy Scherzinger <info@andy-scherzinger.de>
  ~ Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
  ~
  ~ This program is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU General Public License as published by
  ~ the Free Software Foundation, either version 3 of the License, or
  ~ at your option) any later version.
  ~
  ~ This program is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License
  ~ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  -->

<LinearLayout 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/chat_container"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:animateLayoutChanges="true"
    android:background="@color/bg_default"
    android:orientation="vertical">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1">

        <include
            android:id="@+id/lobby"
            layout="@layout/lobby_view"
            android:visibility="gone"
            tools:visibility="visible" />

        <LinearLayout
            android:id="@+id/progressBar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:paddingTop="@dimen/standard_padding"
            android:visibility="gone"
            tools:visibility="visible">

            <include layout="@layout/item_custom_incoming_text_message_shimmer" />

            <include layout="@layout/item_custom_incoming_text_message_shimmer" />

            <include layout="@layout/item_custom_incoming_text_message_shimmer" />
        </LinearLayout>

        <com.stfalcon.chatkit.messages.MessagesList
            android:id="@+id/messagesListView"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:paddingBottom="0dp"
            android:visibility="gone"
            app:dateHeaderTextSize="13sp"
            app:incomingBubblePaddingBottom="@dimen/message_bubble_corners_vertical_padding"
            app:incomingBubblePaddingLeft="@dimen/message_bubble_corners_horizontal_padding"
            app:incomingBubblePaddingRight="@dimen/message_bubble_corners_horizontal_padding"
            app:incomingBubblePaddingTop="@dimen/message_bubble_corners_vertical_padding"
            app:incomingDefaultBubbleColor="@color/bg_message_list_incoming_bubble"
            app:incomingDefaultBubblePressedColor="@color/bg_message_list_incoming_bubble"
            app:incomingDefaultBubbleSelectedColor="@color/transparent"
            app:incomingImageTimeTextSize="12sp"
            app:incomingTextColor="@color/nc_incoming_text_default"
            app:incomingTextLinkColor="@color/nc_incoming_text_default"
            app:incomingTextSize="@dimen/chat_text_size"
            app:incomingTimeTextColor="@color/no_emphasis_text"
            app:incomingTimeTextSize="12sp"
            app:outcomingBubblePaddingBottom="@dimen/message_bubble_corners_vertical_padding"
            app:outcomingBubblePaddingLeft="@dimen/message_bubble_corners_horizontal_padding"
            app:outcomingBubblePaddingRight="@dimen/message_bubble_corners_horizontal_padding"
            app:outcomingBubblePaddingTop="@dimen/message_bubble_corners_vertical_padding"
            app:outcomingDefaultBubbleColor="@color/colorPrimary"
            app:outcomingDefaultBubblePressedColor="@color/colorPrimary"
            app:outcomingDefaultBubbleSelectedColor="@color/transparent"
            app:outcomingImageTimeTextSize="12sp"
            app:outcomingTextColor="@color/high_emphasis_text"
            app:outcomingTextLinkColor="@color/high_emphasis_text"
            app:outcomingTextSize="@dimen/chat_text_size"
            app:outcomingTimeTextSize="12sp"
            app:textAutoLink="all" />

        <com.nextcloud.ui.popupbubble.PopupBubble
            android:id="@+id/popupBubbleView"
            android:theme="@style/Button.Primary"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_centerHorizontal="true"
            android:layout_marginStart="64dp"
            android:layout_marginTop="16dp"
            android:layout_marginEnd="64dp"
            android:layout_marginBottom="16dp"
            android:minHeight="@dimen/min_size_clickable_area"
            android:layout_toStartOf="@+id/scrollDownButton"
            android:text="@string/nc_new_messages"
            app:background="@color/colorPrimary"
            android:ellipsize="middle"
            app:cornerRadius="@dimen/button_corner_radius"
            app:icon="@drawable/ic_baseline_arrow_downward_24px" />

        <com.google.android.material.button.MaterialButton
            android:id="@+id/scrollDownButton"
            style="@style/Widget.AppTheme.Button.ElevatedButton"
            android:layout_width="@dimen/min_size_clickable_area"
            android:layout_height="@dimen/min_size_clickable_area"
            android:layout_alignParentEnd="true"
            android:layout_alignParentBottom="true"
            android:layout_centerHorizontal="true"
            android:layout_marginEnd="@dimen/standard_margin"
            android:layout_marginBottom="@dimen/standard_margin"
            android:contentDescription="@string/scroll_to_bottom"
            android:paddingStart="@dimen/standard_padding"
            android:paddingEnd="@dimen/standard_padding"
            android:visibility="gone"
            app:cornerRadius="@dimen/button_corner_radius"
            app:icon="@drawable/ic_keyboard_double_arrow_down"
            app:iconPadding="0dp"
            app:iconSize="24dp" />

    </RelativeLayout>

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

        <View
            android:id="@+id/separator_1"
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:background="@color/controller_chat_separator" />

        <com.nextcloud.talk.ui.MessageInput
            android:id="@+id/messageInputView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:animateLayoutChanges="true"
            android:inputType="textLongMessage|textAutoComplete"
            android:maxLength="1000"
            app:attachmentButtonBackground="@color/transparent"
            app:attachmentButtonHeight="48dp"
            app:attachmentButtonIcon="@drawable/ic_baseline_attach_file_24"
            app:attachmentButtonMargin="0dp"
            app:attachmentButtonWidth="48dp"
            app:delayTypingStatus="200"
            app:inputButtonDefaultBgColor="@color/transparent"
            app:inputButtonDefaultBgDisabledColor="@color/transparent"
            app:inputButtonDefaultBgPressedColor="@color/transparent"
            app:inputButtonDefaultIconColor="@color/colorPrimary"
            app:inputButtonHeight="48dp"
            app:inputButtonMargin="0dp"
            app:inputButtonWidth="48dp"
            app:inputHint="@string/nc_hint_enter_a_message"
            app:inputTextColor="@color/nc_incoming_text_default"
            app:inputTextSize="16sp"
            app:showAttachmentButton="true" />
    </LinearLayout>
</LinearLayout>