<?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/itemRoomDirectoryLayout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="?riotx_background"
    android:clickable="true"
    android:focusable="true"
    android:foreground="?attr/selectableItemBackground">

    <ImageView
        android:id="@+id/itemRoomDirectoryAvatar"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:layout_marginStart="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginTop="4dp"
        android:layout_marginBottom="4dp"
        app:layout_constraintBottom_toTopOf="@+id/itemRoomDirectoryBottomSeparator"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        tools:src="@tools:sample/avatars" />

    <TextView
        android:id="@+id/itemRoomDirectoryName"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginEnd="16dp"
        android:ellipsize="end"
        android:lines="1"
        android:maxLines="2"
        android:textColor="?riotx_text_primary"
        android:textSize="15sp"
        android:textStyle="bold"
        app:layout_constraintBottom_toTopOf="@+id/itemRoomDirectoryDescription"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/itemRoomDirectoryAvatar"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_chainStyle="packed"
        tools:text="@tools:sample/lorem/random" />

    <TextView
        android:id="@+id/itemRoomDirectoryDescription"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginEnd="16dp"
        android:ellipsize="end"
        android:lines="1"
        android:maxLines="2"
        android:textColor="?riotx_text_primary"
        android:textSize="15sp"
        app:layout_constraintBottom_toTopOf="@+id/itemRoomDirectoryBottomSeparator"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/itemRoomDirectoryAvatar"
        app:layout_constraintTop_toBottomOf="@id/itemRoomDirectoryName"
        tools:text="@string/directory_server_all_rooms_on_server" />

    <View
        android:id="@+id/itemRoomDirectoryBottomSeparator"
        android:layout_width="0dp"
        android:layout_height="1dp"
        android:background="?riotx_header_panel_border_mobile"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>