<?xml version="1.0" encoding="utf-8"?>
<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:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="?colorSurface"
    android:orientation="vertical">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:padding="8dp"
        android:paddingStart="16dp"
        android:paddingEnd="8dp">

        <ImageView
            android:id="@+id/spaceAvatarImageView"
            android:layout_width="40dp"
            android:layout_height="40dp"
            android:contentDescription="@string/avatar"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            tools:src="@sample/space_avatars" />

        <TextView
            android:id="@+id/spaceNameView"
            style="@style/Widget.Vector.TextView.Subtitle"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/layout_horizontal_margin"
            android:duplicateParentState="true"
            android:ellipsize="end"
            android:maxLines="1"
            android:textColor="?vctr_content_primary"
            android:textStyle="bold"
            app:layout_constrainedWidth="true"
            app:layout_constraintBottom_toTopOf="@id/spaceDescription"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@id/spaceAvatarImageView"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintVertical_chainStyle="packed"
            tools:text="@sample/spaces.json/data/name" />

        <TextView
            android:id="@+id/spaceDescription"
            style="@style/Widget.Vector.TextView.Body"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/layout_horizontal_margin"
            android:layout_marginTop="3dp"
            android:layout_marginEnd="8dp"
            android:ellipsize="end"
            android:maxLines="1"
            android:textColor="?vctr_content_secondary"
            android:visibility="gone"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@id/spaceAvatarImageView"
            app:layout_constraintTop_toBottomOf="@id/spaceNameView"
            tools:text="@sample/spaces.json/data/topic"
            tools:visibility="visible" />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <View
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:background="?vctr_list_separator_on_surface" />

    <im.vector.app.core.ui.views.BottomSheetActionButton
        android:id="@+id/invitePeople"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:actionTitle="@string/invite_people_menu"
        app:leftIcon="@drawable/ic_invite_people"
        app:tint="?vctr_content_secondary"
        app:titleTextColor="?vctr_content_primary" />

    <im.vector.app.core.ui.views.BottomSheetActionButton
        android:id="@+id/exploreRooms"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:actionTitle="@string/space_explore_activity_title"
        app:leftIcon="@drawable/ic_explore"
        app:tint="?vctr_content_secondary"
        app:titleTextColor="?vctr_content_primary"
        tools:actionDescription="" />


    <im.vector.app.core.ui.views.BottomSheetActionButton
        android:id="@+id/showMemberList"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:actionTitle="@string/list_members"
        app:leftIcon="@drawable/ic_room_profile_member_list"
        app:tint="?vctr_content_secondary"
        app:titleTextColor="?vctr_content_primary" />

    <!-- Only visible when in developer mode -->
    <im.vector.app.core.ui.views.BottomSheetActionButton
        android:id="@+id/spaceSettings"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:actionTitle="@string/settings"
        app:leftIcon="@drawable/ic_settings_root_general"
        app:tint="?vctr_content_secondary"
        app:titleTextColor="?vctr_content_primary" />

    <im.vector.app.core.ui.views.BottomSheetActionButton
        android:id="@+id/addRooms"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:actionTitle="@string/space_add_child_title"
        app:leftIcon="@drawable/ic_fab_add"
        app:tint="?vctr_content_secondary"
        app:titleTextColor="?vctr_content_primary"
        tools:actionDescription="" />

    <im.vector.app.core.ui.views.BottomSheetActionButton
        android:id="@+id/addSpaces"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:actionTitle="@string/add_space"
        app:leftIcon="@drawable/ic_fab_add"
        app:tint="?vctr_content_secondary"
        app:titleTextColor="?vctr_content_primary"
        app:betaAction="true"
        tools:actionDescription="" />

    <im.vector.app.core.ui.views.BottomSheetActionButton
        android:id="@+id/leaveSpace"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:actionTitle="@string/leave_space"
        app:leftIcon="@drawable/ic_room_actions_leave"
        app:tint="?colorError"
        app:titleTextColor="?colorError" />

</LinearLayout>
