<?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"
    tools:context="createchannel.ui.CreateChannelFragment">

    <include
        android:id="@+id/layout_app_bar"
        layout="@layout/app_bar"
        app:layout_constraintTop_toTopOf="parent" />

    <com.wang.avi.AVLoadingIndicatorView
        android:id="@+id/view_loading"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:visibility="gone"
        app:indicatorColor="@color/colorBlack"
        app:indicatorName="BallPulseIndicator"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/layout_app_bar"
        tools:visibility="visible" />

    <TextView
        android:id="@+id/text_channel_type"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginTop="16dp"
        android:text="@string/msg_public_channel"
        android:textColor="@color/colorPrimaryText"
        android:textSize="16sp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/layout_app_bar" />

    <TextView
        android:id="@+id/text_channel_type_description"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:text="@string/msg_public_channel_description"
        android:textColor="@color/colorSecondaryText"
        android:textSize="12sp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/text_channel_type" />

    <Switch
        android:id="@+id/switch_channel_type"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="16dp"
        app:layout_constraintBottom_toBottomOf="@+id/text_channel_type_description"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="@+id/text_channel_type" />

    <TextView
        android:id="@+id/text_read_only"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"

        android:layout_marginTop="16dp"
        android:text="@string/msg_ready_only_channel"
        android:textColor="@color/colorPrimaryText"
        android:textSize="16sp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/text_channel_type_description" />

    <TextView
        android:id="@+id/text_read_only_description"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"

        android:layout_marginStart="16dp"
        android:text="@string/msg_ready_only_channel_description"
        android:textColor="@color/colorSecondaryText"
        android:textSize="12sp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/text_read_only" />

    <Switch
        android:id="@+id/switch_read_only"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="16dp"

        app:layout_constraintBottom_toBottomOf="@+id/text_read_only_description"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="@+id/text_read_only" />

    <ImageView
        android:id="@+id/image_channel_icon"
        android:layout_width="wrap_content"

        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginTop="22dp"
        android:src="@drawable/ic_hashtag_black_12dp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/text_read_only_description" />

    <EditText
        android:id="@+id/text_channel_name"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginEnd="16dp"
        android:backgroundTint="@color/colorDim"
        android:hint="@string/msg_channel_name"
        android:inputType="text"
        android:maxLines="1"
        android:paddingStart="24dp"
        android:paddingEnd="10dp"
        android:textSize="16sp"
        app:layout_constraintBottom_toBottomOf="@+id/image_channel_icon"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/image_channel_icon"
        app:layout_constraintTop_toTopOf="@+id/image_channel_icon" />

    <ImageView
        android:id="@+id/image_invite_member"
        android:layout_width="14dp"
        android:layout_height="14dp"
        android:layout_marginStart="16dp"
        android:layout_marginTop="16dp"
        android:src="@drawable/ic_at_black_20dp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/text_channel_name" />

    <EditText
        android:id="@+id/text_invite_members"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginEnd="16dp"
        android:backgroundTint="@color/colorDim"
        android:hint="@string/msg_invite_members"
        android:inputType="text"
        android:maxLines="1"
        android:paddingStart="24dp"
        android:paddingEnd="10dp"
        android:textSize="16sp"
        app:layout_constraintBottom_toBottomOf="@+id/image_invite_member"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/image_invite_member"
        app:layout_constraintTop_toTopOf="@+id/image_invite_member" />

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/view_member_suggestion"
        android:layout_width="0dp"
        android:layout_height="100dp"
        android:layout_marginStart="12dp"
        android:layout_marginEnd="12dp"
        android:background="@color/colorWhite"
        android:elevation="2dp"
        android:orientation="vertical"
        android:visibility="gone"
        app:layout_constraintBottom_toTopOf="@+id/text_invite_members"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent">

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/recycler_view"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:visibility="gone"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <com.wang.avi.AVLoadingIndicatorView
            android:id="@+id/view_member_suggestion_loading"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:visibility="gone"
            app:indicatorColor="@color/colorBlack"
            app:indicatorName="BallPulseIndicator"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <TextView
            android:id="@+id/text_member_not_found"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/msg_member_not_found"
            android:visibility="gone"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />
    </androidx.constraintlayout.widget.ConstraintLayout>

    <com.google.android.material.chip.ChipGroup
        android:id="@+id/chip_group_member"
        style="@style/Widget.MaterialComponents.Chip.Entry"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:visibility="gone"
        app:chipSpacing="3dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/text_invite_members" />

</androidx.constraintlayout.widget.ConstraintLayout>