<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Nextcloud Talk - Android Client
  ~
  ~ SPDX-FileCopyrightText: 2020 Andy Scherzinger <info@andy-scherzinger.de>
  ~ SPDX-FileCopyrightText: 2020 Tobias Kaminsky <tobias@kaminsky.me>
  ~ SPDX-License-Identifier: GPL-3.0-or-later
-->
<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"
    style="@style/Widget.Material3.BottomSheet"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:paddingStart="@dimen/standard_padding"
    android:paddingEnd="@dimen/standard_padding"
    android:paddingBottom="@dimen/standard_padding"
    app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">

    <com.google.android.material.bottomsheet.BottomSheetDragHandleView
        android:id="@+id/dragHandle"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

    <TextView
        android:id="@+id/statusMessage"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="@dimen/standard_half_margin"
        android:text="@string/status_message"
        android:textColor="@color/high_emphasis_text"
        android:textSize="@dimen/activity_list_item_title_header_text_size"
        android:textStyle="bold" />

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

        <com.google.android.material.card.MaterialCardView
            android:id="@+id/emojiCard"
            android:layout_width="@dimen/activity_row_layout_height"
            android:layout_height="@dimen/activity_row_layout_height"
            android:layout_gravity="center"
            android:layout_marginTop="@dimen/standard_eighth_margin"
            android:layout_marginEnd="@dimen/standard_margin"
            android:orientation="horizontal"
            app:cardBackgroundColor="@color/grey_200"
            app:cardCornerRadius="24dp"
            app:cardElevation="0dp">

            <com.vanniktech.emoji.EmojiEditText
                android:id="@+id/emoji"
                android:layout_width="@dimen/activity_row_layout_height"
                android:layout_height="@dimen/activity_row_layout_height"
                android:background="@color/grey_200"
                android:cursorVisible="false"
                android:gravity="center"
                android:text="@string/default_emoji"
                android:textSize="24sp" />

        </com.google.android.material.card.MaterialCardView>

        <com.google.android.material.textfield.TextInputLayout
            android:id="@+id/customStatusInput_container"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:hint="@string/whats_your_status">

            <com.google.android.material.textfield.TextInputEditText
                android:id="@+id/customStatusInput"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:ems="10"
                android:importantForAutofill="no"
                android:inputType="textAutoCorrect"
                android:scrollbars="vertical" />

        </com.google.android.material.textfield.TextInputLayout>

    </LinearLayout>

    <TextView
        android:id="@+id/automatic_status"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:padding="10dp"
        android:text="@string/automatic_status_set"
        android:visibility="gone"
        tools:visibility="visible" />

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/predefinedStatusList"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        tools:itemCount="5"
        tools:listitem="@layout/predefined_status" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/standard_margin"
        android:orientation="vertical">

        <TextView
            android:id="@+id/clearStatusMessageTextView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="@dimen/standard_half_margin"
            android:text="@string/clear_status_message_after"
            android:textColor="@color/high_emphasis_text" />

        <Spinner
            android:layout_marginStart="-8dp"
            android:id="@+id/clearStatusAfterSpinner"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:paddingTop="@dimen/standard_half_padding"/>

        <TextView
            android:id="@+id/remainingClearTime"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="4dp"
            android:textColor="@color/high_emphasis_text"
            android:visibility="gone" />
    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/standard_half_margin"
        android:orientation="horizontal">

        <com.google.android.material.button.MaterialButton
            android:id="@+id/clearStatus"
            style="@style/Button.Borderless"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_marginEnd="@dimen/standard_half_margin"
            android:layout_weight="1"
            android:text="@string/clear_status_message"
            app:cornerRadius="@dimen/button_corner_radius" />

        <com.google.android.material.button.MaterialButton
            android:id="@+id/setStatus"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:text="@string/set_status_message"
            android:theme="@style/Button.Primary"
            app:cornerRadius="@dimen/button_corner_radius" />
    </LinearLayout>

</LinearLayout>
