<?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="wrap_content"
    android:layout_centerInParent="true"
    android:gravity="center"
    android:orientation="vertical"
    android:paddingTop="8dp"
    android:paddingBottom="4dp">

    <TextView
        android:id="@+id/titleLabel"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:textAlignment="textStart"
        android:layout_marginVertical="4dp"
        android:accessibilityHeading="true"
        app:layout_constraintWidth_max="wrap"
        app:layout_constraintWidth_percent="0.6"
        app:layout_constraintBottom_toBottomOf="@id/barrier"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintHorizontal_chainStyle="packed"
        app:layout_constraintHorizontal_bias="0"
        app:layout_constraintWidth_default="wrap"
        app:layout_constraintEnd_toStartOf="@id/shuffleButton"
        style="@style/TextAppearance.Material3.TitleMedium"
        tools:text="Title" />

    <ImageButton
        android:id="@+id/shuffleButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginVertical="4dp"
        android:layout_marginStart="8dp"
        android:layout_marginLeft="8dp"
        android:background="?attr/selectableItemBackgroundBorderless"
        android:visibility="gone"
        android:contentDescription="@string/shuffle_suggestions"
        app:layout_constraintBottom_toBottomOf="@id/barrier"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintStart_toEndOf="@id/titleLabel"
        app:layout_constraintEnd_toStartOf="@id/numNewItemsLabel"
        tools:visibility="visible"
        app:srcCompat="@drawable/ic_shuffle" />

    <TextView
        android:id="@+id/numNewItemsLabel"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginTop="2dp"
        android:layout_marginBottom="0dp"
        android:paddingBottom="1sp"
        android:background="@drawable/bg_pill"
        android:paddingHorizontal="8dp"
        android:textAlignment="center"
        android:textColor="?attr/colorPrimary"
        android:visibility="gone"
        style="@style/TextAppearance.Material3.TitleMedium"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="@id/barrier"
        app:layout_constraintStart_toEndOf="@id/shuffleButton"
        app:layout_constraintEnd_toStartOf="@id/moreButton"
        tools:visibility="visible"
        tools:text="6" />

    <Button
        android:id="@+id/moreButton"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:minWidth="0dp"
        android:minHeight="0dp"
        android:paddingVertical="4dp"
        android:layout_marginEnd="16dp"
        android:layout_marginStart="16dp"
        android:textAlignment="textEnd"
        app:layout_constraintWidth_max="wrap"
        app:layout_constraintWidth_percent="0.4"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="@id/barrier"
        tools:text="more »"
        style="@style/Widget.MaterialComponents.Button.TextButton" />

    <androidx.constraintlayout.widget.Barrier
        android:id="@+id/barrier"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:barrierDirection="bottom"
        app:constraint_referenced_ids="titleLabel,moreButton" />

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/recyclerView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/moreButton"
        android:clipToPadding="false"
        android:clipToOutline="false"
        android:clipChildren="false"
        android:paddingHorizontal="16dp"
        app:layout_constraintTop_toBottomOf="@id/barrier"
        tools:listitem="@layout/horizontal_itemlist_item"
        tools:itemCount="1" />

    <TextView
        android:id="@+id/emptyLabel"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:visibility="gone"
        android:paddingHorizontal="32dp"
        android:paddingVertical="8dp"
        android:textAlignment="center"
        app:layout_constraintTop_toBottomOf="@id/barrier" />

</androidx.constraintlayout.widget.ConstraintLayout>
