<?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:id="@+id/mainContainer"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <View
        android:id="@+id/divider"
        android:layout_width="match_parent"
        android:layout_height="1px"
        android:background="?android:dividerHorizontal"
        android:elevation="1dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <EditText
        android:id="@+id/communityUrlEditText"
        android:contentDescription="@string/AccessibilityId_community_input_box"
        style="@style/SmallSessionEditText"
        android:layout_width="match_parent"
        android:layout_height="64dp"
        android:layout_marginHorizontal="@dimen/large_spacing"
        android:layout_marginTop="@dimen/large_spacing"
        android:gravity="center_vertical"
        android:hint="@string/fragment_enter_community_url_edit_text_hint"
        android:inputType="textUri"
        android:maxLines="3"
        android:paddingTop="0dp"
        android:paddingBottom="0dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/divider" />

    <RelativeLayout
        android:id="@+id/defaultRoomsLoaderContainer"
        android:layout_width="match_parent"
        android:layout_height="80dp"
        android:layout_marginTop="56dp"
        android:visibility="gone"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/communityUrlEditText">

        <com.github.ybq.android.spinkit.SpinKitView
            android:id="@+id/defaultRoomsLoader"
            style="@style/SpinKitView.Large.ThreeBounce"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:visibility="gone"
            app:SpinKit_Color="?android:textColorPrimary" />

    </RelativeLayout>

    <LinearLayout
        android:id="@+id/defaultRoomsContainer"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:orientation="vertical"
        android:visibility="gone"
        app:layout_constraintBottom_toTopOf="@id/joinCommunityButton"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/communityUrlEditText"
        tools:visibility="visible">

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginVertical="16dp"
            android:paddingHorizontal="24dp"
            android:text="@string/activity_join_public_chat_join_rooms"
            android:textSize="18sp"
            android:textStyle="bold" />

        <com.google.android.flexbox.FlexboxLayout
            android:id="@+id/defaultRoomsFlexboxLayout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:paddingHorizontal="16dp"
            app:alignItems="center"
            app:flexDirection="row"
            app:flexWrap="wrap"
            app:justifyContent="center" />

    </LinearLayout>

    <Button
        android:id="@+id/joinCommunityButton"
        style="@style/Widget.Session.Button.Common.ProminentOutline"
        android:contentDescription="@string/AccessibilityId_join_community_button"
        android:layout_width="196dp"
        android:layout_height="@dimen/medium_button_height"
        android:layout_marginVertical="@dimen/large_spacing"
        android:text="@string/fragment_enter_community_url_join_button_title"
        android:enabled="false"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>