<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    tools:viewBindingIgnore="true"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <androidx.appcompat.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="@dimen/signal_m3_toolbar_height"
        android:minHeight="@dimen/signal_m3_toolbar_height"
        app:layout_constraintTop_toTopOf="parent"
        app:navigationIcon="@drawable/symbol_arrow_start_24"
        app:titleTextAppearance="@style/TextAppearance.Material3.TitleLarge"
        tools:title="@string/AddGroupDetailsFragment__name_this_group" />

    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/group_avatar"
        android:layout_width="64dp"
        android:layout_height="64dp"
        android:layout_marginStart="@dimen/dsl_settings_gutter"
        android:layout_marginTop="16dp"
        android:background="@drawable/tinted_circle"
        app:backgroundTint="?attr/colorSurfaceVariant"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/toolbar" />

    <org.thoughtcrime.securesms.components.emoji.EmojiEditText
        android:id="@+id/name"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginEnd="@dimen/dsl_settings_gutter"
        android:background="@null"
        android:hint="@string/AddGroupDetailsFragment__group_name_required"
        android:inputType="text"
        android:maxLines="1"
        android:textAppearance="@style/Signal.Text.BodyLarge"
        android:textColorHint="@color/signal_colorOnSurfaceVariant_60"
        app:layout_constraintBottom_toBottomOf="@id/group_avatar"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/group_avatar"
        app:layout_constraintTop_toTopOf="@id/group_avatar" />

    <LinearLayout
        android:id="@+id/group_disappearing_messages_row"
        android:layout_width="match_parent"
        android:layout_height="56dp"
        android:layout_marginTop="16dp"
        android:background="?attr/selectableItemBackground"
        android:gravity="center_vertical"
        android:orientation="horizontal"
        android:paddingHorizontal="@dimen/dsl_settings_gutter"
        app:layout_constraintTop_toBottomOf="@id/group_avatar">

        <androidx.appcompat.widget.AppCompatImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:srcCompat="@drawable/ic_timer_disabled_24"
            app:tint="?attr/signal_text_primary" />

        <TextView
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="24dp"
            android:layout_marginEnd="8dp"
            android:layout_weight="1"
            android:text="@string/PrivacySettingsFragment__disappearing_messages"
            android:textAppearance="@style/Signal.Text.BodyLarge" />

        <TextView
            android:id="@+id/group_disappearing_messages_value"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textAppearance="@style/Signal.Text.BodyLarge"
            android:textColor="?attr/signal_text_secondary"
            tools:text="1 week" />

    </LinearLayout>

    <View
        android:id="@+id/divider"
        android:layout_width="match_parent"
        android:layout_height="2dp"
        android:layout_marginTop="16dp"
        android:layout_marginBottom="16dp"
        android:background="?attr/colorSurfaceVariant"
        app:layout_constraintBottom_toTopOf="@id/mms_warning"
        app:layout_constraintTop_toBottomOf="@id/group_disappearing_messages_row" />

    <LinearLayout
        android:id="@+id/mms_warning"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/dsl_settings_gutter"
        android:layout_marginEnd="@dimen/dsl_settings_gutter"
        android:orientation="vertical"
        android:visibility="gone"
        app:layout_constraintBottom_toTopOf="@id/member_list_header"
        app:layout_constraintTop_toBottomOf="@id/divider"
        app:layout_goneMarginTop="23dp"
        tools:visibility="visible">

        <TextView
            android:id="@+id/mms_warning_text"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/rounded_outline_12"
            android:paddingStart="16dp"
            android:paddingTop="16dp"
            android:paddingEnd="16dp"
            android:paddingBottom="16dp"
            android:text="@string/AddGroupDetailsFragment__youve_selected_a_contact_that_doesnt_support_signal_groups_mms_removal"
            android:textAppearance="@style/Signal.Text.BodyMedium"
            android:textColor="?attr/colorOnSurfaceVariant" />

    </LinearLayout>

    <TextView
        android:id="@+id/member_list_header"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/dsl_settings_gutter"
        android:layout_marginEnd="@dimen/dsl_settings_gutter"
        android:gravity="center_vertical"
        android:minHeight="52sp"
        android:text="@string/AddGroupDetailsFragment__members"
        android:textAppearance="@style/Signal.Text.TitleSmall"
        app:layout_constraintTop_toBottomOf="@id/mms_warning" />

    <TextView
        android:id="@+id/add_later"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/dsl_settings_gutter"
        android:layout_marginEnd="@dimen/dsl_settings_gutter"
        android:text="@string/AddGroupDetailsFragment__you_can_add_or_invite_friends_after_creating_this_group"
        android:textAppearance="@style/Signal.Text.BodyMedium"
        android:textColor="?attr/colorOnSurfaceVariant"
        android:visibility="gone"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/member_list_header" />

    <org.thoughtcrime.securesms.groups.ui.GroupMemberListView
        android:id="@+id/member_list"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toBottomOf="@id/member_list_header" />

    <org.thoughtcrime.securesms.util.views.CircularProgressMaterialButton
        android:id="@+id/create"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="16dp"
        android:layout_marginBottom="16dp"
        android:textAllCaps="false"
        app:circularProgressMaterialButton__label="@string/AddGroupDetailsFragment__create"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>