<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ F7cloud Talk - Android Client
  ~
  ~ SPDX-FileCopyrightText: 2022-2023 Marcel Hibbe <dev@mhibbe.de>
  ~ SPDX-FileCopyrightText: 2022 Tim Krüger <t@timkrueger.me>
  ~ SPDX-FileCopyrightText: 2021 Andy Scherzinger <info@andy-scherzinger.de>
  ~ SPDX-FileCopyrightText: 2017-2018 Mario Danic <mario@lovelyhq.com>
  ~ 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"
    android:id="@+id/parent_container"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:visibility="visible">

    <com.google.android.material.appbar.AppBarLayout
        android:id="@+id/conversation_info_appbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <com.google.android.material.appbar.MaterialToolbar
            android:id="@+id/conversation_info_toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="@color/appbar"
            android:theme="?attr/actionBarPopupTheme"
            app:layout_scrollFlags="scroll|enterAlways"
            app:navigationIconTint="@color/fontAppbar"
            app:popupTheme="@style/appActionBarPopupMenu"
            app:titleTextColor="@color/fontAppbar"
            tools:title="@string/nc_app_product_name" />
    </com.google.android.material.appbar.AppBarLayout>

    <ProgressBar
        android:id="@+id/progressBar"
        android:layout_width="@dimen/item_height"
        android:layout_height="@dimen/item_height"
        android:layout_gravity="center"
        android:layout_marginStart="@dimen/activity_horizontal_margin"
        android:layout_marginLeft="@dimen/activity_horizontal_margin"
        android:layout_marginEnd="@dimen/activity_horizontal_margin"
        android:layout_marginRight="@dimen/activity_horizontal_margin"
        android:indeterminate="true"
        android:indeterminateTint="@color/textColorMaxContrast"
        android:indeterminateTintMode="src_in"
        tools:visibility="gone" />

    <androidx.core.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

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

            <RelativeLayout
                android:id="@+id/conversation_info_name"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/standard_margin"
                android:layout_marginTop="@dimen/standard_quarter_margin"
                android:layout_marginEnd="@dimen/standard_margin"
                android:animateLayoutChanges="true"
                android:visibility="gone"
                tools:visibility="visible">

                <ImageView
                    android:id="@+id/avatar_image"
                    android:layout_width="@dimen/avatar_size_big"
                    android:layout_height="@dimen/avatar_size_big"
                    android:layout_centerHorizontal="true"
                    android:layout_marginTop="@dimen/standard_margin"
                    android:contentDescription="@string/avatar"
                    tools:src="@drawable/account_circle_48dp" />

                <androidx.emoji2.widget.EmojiTextView
                    android:id="@+id/display_name_text"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@id/avatar_image"
                    android:layout_centerHorizontal="true"
                    android:layout_marginTop="@dimen/margin_between_elements"
                    android:textSize="@dimen/headline_text_size"
                    android:textStyle="bold"
                    tools:text="Jane Doe" />

                <androidx.emoji2.widget.EmojiTextView
                    android:id="@+id/pronouns"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@id/avatar_image"
                    android:paddingBottom="4dp"
                    android:paddingTop="2dp"
                    android:layout_marginStart="@dimen/margin_between_elements"
                    android:layout_marginTop="@dimen/margin_between_elements"
                    android:layout_toEndOf="@id/display_name_text"
                    android:textSize="@dimen/supporting_text_text_size"
                    android:visibility="gone"
                    tools:visibility="visible"
                    tools:text="She/Her"
                    />

                <androidx.emoji2.widget.EmojiTextView
                    android:id="@+id/profession_company"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@id/display_name_text"
                    android:layout_centerHorizontal="true"
                    android:layout_marginTop="@dimen/margin_between_elements"
                    android:textSize="@dimen/headline_text_size"
                    android:visibility="gone"
                    tools:visibility="visible"
                    tools:text="Marketing Manager @ F7cloud" />

                <androidx.emoji2.widget.EmojiTextView
                    android:id="@+id/location_time"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@id/profession_company"
                    android:layout_centerHorizontal="true"
                    android:layout_marginTop="@dimen/margin_between_elements"
                    android:textSize="@dimen/headline_text_size"
                    android:visibility="gone"
                    tools:visibility="visible"
                    tools:text="10:03 PM · London" />

            </RelativeLayout>

            <LinearLayout
                android:id="@+id/conversation_description"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/standard_quarter_margin"
                android:animateLayoutChanges="true"
                android:visibility="gone"
                tools:visibility="visible">

                <androidx.emoji2.widget.EmojiTextView
                    android:id="@+id/description_text"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="@dimen/standard_margin"
                    android:layout_marginTop="@dimen/standard_half_margin"
                    android:layout_marginEnd="@dimen/standard_margin"
                    android:layout_marginBottom="@dimen/standard_half_margin"
                    android:autoLink="web"
                    tools:text="Hello world!" />
            </LinearLayout>

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

                <include
                    android:id="@+id/notification_settings_view"
                    layout="@layout/item_notification_settings"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/standard_quarter_margin" />

                <include
                    android:id="@+id/webinar_info_view"
                    layout="@layout/item_webinar_info"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/standard_quarter_margin" />

                <include
                    android:id="@+id/guest_access_view"
                    layout="@layout/item_guest_access_settings"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/standard_quarter_margin" />

            </LinearLayout>

            <LinearLayout
                android:id="@+id/add_to_favorites_button"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/standard_quarter_margin"
                android:orientation="horizontal"
                android:padding="@dimen/standard_half_padding"
                android:visibility="gone"
                tools:visibility="gone">

                <com.google.android.material.button.MaterialButton
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:background="@color/transparent"
                    app:icon="@drawable/ic_star_black_24dp"
                    app:iconGravity="textStart"
                    app:iconSize="@dimen/sm_icon_height"
                    app:iconTint="@color/grey_600" />

                <com.google.android.material.textview.MaterialTextView
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:gravity="center_vertical"
                    android:text="@string/nc_add_to_favorites"
                    android:textSize="@dimen/two_line_primary_text_size" />

            </LinearLayout>

            <LinearLayout
                android:id="@+id/shared_items"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/standard_quarter_margin"
                android:orientation="vertical">

                <com.google.android.material.textview.MaterialTextView
                    android:id="@+id/shared_items_title"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:padding="@dimen/standard_padding"
                    android:text="@string/nc_shared_items"
                    android:textSize="@dimen/headline_text_size"
                    android:textStyle="bold" />

                <LinearLayout
                    android:id="@+id/shared_items_button"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="?android:attr/selectableItemBackground"
                    android:orientation="horizontal"
                    android:padding="@dimen/standard_padding">

                    <ImageView
                        android:layout_width="24dp"
                        android:layout_height="40dp"
                        android:layout_marginEnd="@dimen/standard_margin"
                        android:contentDescription="@null"
                        android:src="@drawable/ic_folder_multiple_image"
                        app:tint="@color/grey_600" />

                    <com.google.android.material.textview.MaterialTextView
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:gravity="center_vertical"
                        android:text="@string/nc_shared_items_description"
                        android:textSize="@dimen/two_line_primary_text_size" />

                </LinearLayout>

                <LinearLayout
                    android:id="@+id/showThreadsButton"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="?android:attr/selectableItemBackground"
                    android:orientation="horizontal"
                    android:padding="@dimen/standard_padding">

                    <ImageView
                        android:layout_width="24dp"
                        android:layout_height="40dp"
                        android:layout_marginEnd="@dimen/standard_margin"
                        android:contentDescription="@null"
                        android:src="@drawable/outline_forum_24"
                        app:tint="@color/grey_600" />

                    <com.google.android.material.textview.MaterialTextView
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:gravity="center_vertical"
                        android:text="@string/recent_threads"
                        android:textSize="@dimen/two_line_primary_text_size" />

                </LinearLayout>

            </LinearLayout>

            <include
                android:id="@+id/recording_consent_view"
                layout="@layout/item_recording_consent"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/standard_quarter_margin" />

            <LinearLayout
                android:id="@+id/conversation_settings"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/standard_quarter_margin"
                android:orientation="vertical">

                <com.google.android.material.textview.MaterialTextView
                    android:id="@+id/conversation_settings_title"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:padding="@dimen/standard_padding"
                    android:text="@string/nc_conversation_settings"
                    android:textSize="@dimen/headline_text_size"
                    android:textStyle="bold" />

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

                    <com.google.android.material.textfield.TextInputLayout
                        android:id="@+id/conversation_info_chat_settings_input_layout"
                        style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginHorizontal="@dimen/standard_margin"
                        android:layout_marginTop="@dimen/standard_half_margin"
                        android:hint="@string/nc_expire_messages">

                        <com.google.android.material.textfield.MaterialAutoCompleteTextView
                            android:id="@+id/conversation_settings_dropdown"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:inputType="none"
                            android:lines="1"
                            android:popupTheme="@style/ThemeOverlay.AppTheme.PopupMenu"
                            android:text="" />

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

                    <com.google.android.material.textview.MaterialTextView
                        android:id="@+id/conversation_info_expire_messages_explanation"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_margin="@dimen/standard_margin"
                        android:text="@string/nc_expire_messages_explanation"
                        android:textColor="@color/disabled_text"
                        android:textSize="@dimen/supporting_text_text_size" />
                </LinearLayout>

                <LinearLayout
                    android:id="@+id/share_conversation_button"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="?android:attr/selectableItemBackground"
                    android:orientation="horizontal"
                    android:paddingStart="@dimen/standard_margin"
                    android:paddingTop="@dimen/standard_half_margin"
                    android:paddingEnd="@dimen/standard_margin"
                    android:paddingBottom="@dimen/standard_half_margin">


                    <ImageView
                        android:layout_width="24dp"
                        android:layout_height="40dp"
                        android:layout_marginEnd="@dimen/standard_margin"
                        android:contentDescription="@null"
                        android:src="@drawable/ic_share_variant"
                        app:tint="@color/grey_600" />

                    <com.google.android.material.textview.MaterialTextView
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:gravity="center_vertical"
                        android:text="@string/nc_guest_access_share_link"
                        android:textSize="@dimen/headline_text_size" />

                </LinearLayout>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/lock_conversation"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="?android:attr/selectableItemBackground"
                android:orientation="horizontal"
                android:paddingStart="@dimen/standard_margin"
                android:paddingEnd="@dimen/standard_margin">

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:orientation="horizontal"
                    android:paddingTop="@dimen/standard_half_margin"
                    android:paddingBottom="@dimen/standard_half_margin">

                    <ImageView
                        android:layout_width="24dp"
                        android:layout_height="40dp"
                        android:layout_marginEnd="@dimen/standard_margin"
                        android:contentDescription="@null"
                        android:src="@drawable/ic_lock_white_24px"
                        app:tint="@color/grey_600" />

                    <com.google.android.material.textview.MaterialTextView
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:gravity="center_vertical"
                        android:text="@string/lock_conversation"
                        android:textSize="@dimen/headline_text_size" />

                </LinearLayout>

                <com.google.android.material.materialswitch.MaterialSwitch
                    android:id="@+id/lock_conversation_switch"
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:layout_gravity="center_vertical"
                    android:layout_marginStart="@dimen/standard_margin"
                    android:layout_marginEnd="1dp"
                    android:clickable="false"
                    android:focusable="true" />
            </LinearLayout>

            <LinearLayout
                android:id="@+id/participants"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/standard_quarter_margin"
                android:orientation="vertical"
                android:visibility="gone"
                tools:ignore="UnknownIdInLayout"
                tools:visibility="visible">

                <com.google.android.material.textview.MaterialTextView
                    android:id="@+id/participants_list_category"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:padding="@dimen/standard_padding"
                    android:text="@string/nc_participants"
                    android:textColor="@color/colorPrimary"
                    android:textSize="@dimen/headline_text_size"
                    android:textStyle="bold" />

                <LinearLayout
                    android:id="@+id/addParticipantsAction"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/standard_quarter_margin"
                    android:background="?android:attr/selectableItemBackground"
                    android:orientation="horizontal"
                    android:padding="@dimen/standard_padding">

                    <ImageView
                        android:layout_width="24dp"
                        android:layout_height="40dp"
                        android:layout_marginEnd="@dimen/standard_margin"
                        android:contentDescription="@null"
                        android:src="@drawable/ic_account_plus"
                        app:tint="@color/grey_600" />


                    <com.google.android.material.textview.MaterialTextView
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:gravity="center_vertical"
                        android:text="@string/nc_participants_add"
                        android:textSize="@dimen/two_line_primary_text_size" />

                </LinearLayout>

                <LinearLayout
                    android:id="@+id/startGroupChat"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/standard_quarter_margin"
                    android:background="?android:attr/selectableItemBackground"
                    android:orientation="horizontal"
                    android:padding="@dimen/standard_padding"
                    android:visibility="gone"
                    tools:visibility="visible">

                    <ImageView
                        android:layout_width="24dp"
                        android:layout_height="40dp"
                        android:layout_marginEnd="@dimen/standard_margin"
                        android:contentDescription="@null"
                        android:src="@drawable/ic_people_group_black_24px"
                        app:tint="@color/grey_600" />

                    <com.google.android.material.textview.MaterialTextView
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:gravity="center_vertical"
                        android:text="@string/nc_start_group_chat"
                        android:textSize="@dimen/two_line_primary_text_size" />

                </LinearLayout>

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/recycler_view"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    tools:listitem="@layout/rv_item_conversation_info_participant" />
            </LinearLayout>

            <LinearLayout
                android:id="@+id/list_bans_button"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="?android:attr/selectableItemBackground"
                android:orientation="horizontal"
                android:paddingStart="@dimen/standard_margin"
                android:paddingTop="@dimen/standard_half_margin"
                android:paddingEnd="@dimen/standard_margin"
                android:paddingBottom="@dimen/standard_half_margin">

                <ImageView
                    android:layout_width="24dp"
                    android:layout_height="40dp"
                    android:layout_marginEnd="@dimen/standard_margin"
                    android:contentDescription="@null"
                    android:src="@drawable/baseline_block_24"
                    app:tint="@color/grey_600" />

                <com.google.android.material.textview.MaterialTextView
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:gravity="center_vertical"
                    android:text="@string/show_banned_participants"
                    android:textSize="@dimen/headline_text_size" />
            </LinearLayout>

            <LinearLayout
                android:id="@+id/danger_zone_options"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/standard_quarter_margin"
                android:orientation="vertical">

                <com.google.android.material.textview.MaterialTextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:padding="@dimen/standard_padding"
                    android:text="@string/danger_zone"
                    android:textColor="@color/design_default_color_error"
                    android:textSize="@dimen/headline_text_size"
                    android:textStyle="bold" />

                <LinearLayout
                    android:id="@+id/archive_conversation_btn"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="?android:attr/selectableItemBackground"
                    android:orientation="horizontal"
                    android:paddingStart="@dimen/standard_margin"
                    android:paddingEnd="@dimen/standard_margin">

                    <ImageView
                        android:id="@+id/archive_conversation_icon"
                        android:layout_width="24dp"
                        android:layout_height="40dp"
                        android:layout_marginEnd="@dimen/standard_margin"
                        android:contentDescription="@null"
                        app:tint="@color/grey_600"
                        tools:src="@drawable/outline_archive_24" />

                    <com.google.android.material.textview.MaterialTextView
                        android:id="@+id/archive_conversation_text"
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:gravity="center_vertical"
                        android:textSize="@dimen/headline_text_size"
                        tools:text="@string/unarchive_conversation" />
                </LinearLayout>

                <com.google.android.material.textview.MaterialTextView
                    android:id="@+id/archive_conversation_text_hint"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginHorizontal="@dimen/standard_margin"
                    android:text="@string/archive_hint"
                    android:textColor="@color/disabled_text" />

                <LinearLayout
                    android:id="@+id/leaveConversationAction"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/standard_quarter_margin"
                    android:background="?android:attr/selectableItemBackground"
                    android:orientation="horizontal"
                    android:padding="@dimen/standard_half_padding">

                    <ImageView
                        android:layout_width="24dp"
                        android:layout_height="40dp"
                        android:layout_marginEnd="@dimen/standard_margin"
                        android:contentDescription="@null"
                        android:src="@drawable/ic_exit_to_app_black_24dp"
                        app:tint="@color/design_default_color_error" />

                    <com.google.android.material.textview.MaterialTextView
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:gravity="center_vertical"
                        android:text="@string/nc_leave"
                        android:textColor="@color/design_default_color_error"
                        android:textSize="@dimen/two_line_primary_text_size" />
                </LinearLayout>

                <LinearLayout
                    android:id="@+id/clearConversationHistory"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/standard_quarter_margin"
                    android:background="?android:attr/selectableItemBackground"
                    android:orientation="horizontal"
                    android:padding="@dimen/standard_half_padding">

                    <ImageView
                        android:layout_width="24dp"
                        android:layout_height="40dp"
                        android:layout_marginEnd="@dimen/standard_margin"
                        android:contentDescription="@null"
                        android:src="@drawable/ic_delete_black_24dp"
                        app:tint="@color/design_default_color_error" />

                    <com.google.android.material.textview.MaterialTextView
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:gravity="center_vertical"
                        android:text="@string/nc_clear_history"
                        android:textColor="@color/design_default_color_error"
                        android:textSize="@dimen/two_line_primary_text_size" />
                </LinearLayout>

                <LinearLayout
                    android:id="@+id/deleteConversationAction"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/standard_quarter_margin"
                    android:background="?android:attr/selectableItemBackground"
                    android:orientation="horizontal"
                    android:padding="@dimen/standard_half_padding">

                    <ImageView
                        android:layout_width="24dp"
                        android:layout_height="40dp"
                        android:layout_marginEnd="@dimen/standard_margin"
                        android:contentDescription="@null"
                        android:src="@drawable/ic_delete_black_24dp"
                        app:tint="@color/design_default_color_error" />

                    <com.google.android.material.textview.MaterialTextView
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:gravity="center_vertical"
                        android:text="@string/nc_delete_call"
                        android:textColor="@color/design_default_color_error"
                        android:textSize="@dimen/two_line_primary_text_size" />

                </LinearLayout>
            </LinearLayout>
            <Space
                android:layout_width="match_parent"
                android:layout_height="50dp" />
        </LinearLayout>
    </androidx.core.widget.NestedScrollView>
</LinearLayout>
