<?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"
    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="?actionBarSize"
        app:layout_constraintTop_toTopOf="parent"
        app:navigationIcon="@drawable/ic_arrow_left_24"
        app:titleTextAppearance="@style/TextAppearance.Signal.Body1.Bold"
        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="16dp"
        android:layout_marginTop="16dp"
        android:background="@drawable/tinted_circle"
        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="12dp"
        android:layout_marginEnd="16dp"
        android:background="@null"
        android:hint="@string/AddGroupDetailsFragment__group_name_required"
        android:inputType="text"
        android:maxLines="1"
        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="wrap_content"
        android:layout_marginTop="16dp"
        android:background="?attr/selectableItemBackground"
        android:gravity="center_vertical"
        android:orientation="horizontal"
        android:padding="16dp"
        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="@color/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/TextAppearance.Signal.Body1" />

        <TextView
            android:id="@+id/group_disappearing_messages_value"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textAppearance="@style/TextAppearance.Signal.Body1"
            android:textColor="@color/signal_text_secondary"
            tools:text="1 week" />

    </LinearLayout>

    <LinearLayout
        android:id="@+id/mms_warning"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:orientation="vertical"
        android:visibility="gone"
        app:layout_constraintBottom_toTopOf="@id/gv2_warning"
        app:layout_constraintTop_toBottomOf="@id/group_disappearing_messages_row"
        tools:visibility="visible">

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="?colorAccent"
            android:paddingStart="16dp"
            android:paddingTop="8dp"
            android:paddingEnd="16dp"
            android:text="@string/AddGroupDetailsFragment_custom_mms_group_names_and_photos_will_only_be_visible_to_you"
            android:textAppearance="@style/TextAppearance.Signal.Body2"
            android:textColor="@color/white" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="?colorAccent"
            android:paddingStart="16dp"
            android:paddingTop="8dp"
            android:paddingEnd="16dp"
            android:paddingBottom="8dp"
            android:text="@string/AddGroupDetailsFragment__youve_selected_a_contact_that_doesnt"
            android:textAppearance="@style/TextAppearance.Signal.Body2"
            android:textColor="@color/white" />

    </LinearLayout>

    <org.thoughtcrime.securesms.util.views.LearnMoreTextView
        android:id="@+id/gv2_warning"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:background="@color/signal_background_tertiary"
        android:paddingStart="16dp"
        android:paddingTop="8dp"
        android:paddingEnd="16dp"
        android:paddingBottom="8dp"
        android:textAppearance="@style/TextAppearance.Signal.Body2"
        android:textColor="@color/signal_text_secondary"
        android:visibility="gone"
        app:layout_constraintBottom_toTopOf="@id/member_list_header"
        app:layout_constraintTop_toBottomOf="@id/mms_warning"
        tools:text="8 members do not support New Groups, so this group will be a Legacy Group. Learn more"
        tools:visibility="visible" />

    <TextView
        android:id="@+id/member_list_header"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginTop="12dp"
        android:text="@string/AddGroupDetailsFragment__members"
        android:textAlignment="viewStart"
        android:textAppearance="@style/TextAppearance.Signal.Subtitle2"
        android:textColor="@color/signal_text_secondary"
        app:layout_constraintTop_toBottomOf="@id/gv2_warning"
        app:layout_goneMarginTop="30dp" />

    <TextView
        android:id="@+id/add_later"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginEnd="16dp"
        android:text="@string/AddGroupDetailsFragment__you_can_add_or_invite_friends_after_creating_this_group"
        android:textAppearance="@style/TextAppearance.Signal.Body2"
        android:textColor="@color/signal_text_secondary"
        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" />

    <com.dd.CircularProgressButton
        android:id="@+id/create"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="16dp"
        android:layout_marginBottom="16dp"
        android:textColor="@color/white"
        app:cpb_colorIndicator="@color/white"
        app:cpb_colorProgress="?colorAccent"
        app:cpb_cornerRadius="28dp"
        app:cpb_selectorIdle="@drawable/progress_button_state"
        app:cpb_textIdle="@string/AddGroupDetailsFragment__create"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>