<!--
  ~ Nextcloud - Android Client
  ~
  ~ SPDX-FileCopyrightText: 2020 Andy Scherzinger <info@andy-scherzinger>
  ~ SPDX-FileCopyrightText: 2020 Tobias Kaminsky <tobias@kaminsky.me>
  ~ SPDX-FileCopyrightText: 2020 Nextcloud GmbH
  ~ SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
-->
<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:layout_width="match_parent"
        android:layout_height="wrap_content" />

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

        <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:textAlignment="viewStart"
            android:textColor="@color/high_emphasis_text"
            android:textSize="@dimen/activity_list_item_title_header_text_size"
            android:textStyle="bold"
            app:layout_constraintTop_toBottomOf="@+id/statusView" />

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


            <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/transparent"
                android:cursorVisible="false"
                android:gravity="center_vertical"
                android:text="@string/default_emoji"
                android:textSize="24sp" />


            <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.TextInputEditText>

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

        </LinearLayout>

    </LinearLayout>

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/predefinedStatusList"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        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/alternate_half_margin"
            android:text="@string/clear_status_after"
            android:textSize="@dimen/activity_list_item_title_header_text_size"
            android:textColor="@color/high_emphasis_text" />

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

        <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"
            app:cornerRadius="@dimen/status_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_message"
            android:theme="@style/Button.Primary"
            app:cornerRadius="@dimen/button_corner_radius" />

    </LinearLayout>

</LinearLayout>
