<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
    xmlns:tools="http://schemas.android.com/tools"
    tools:viewBindingIgnore="true"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <View
        android:id="@+id/anchor"
        android:layout_width="48dp"
        android:layout_height="2dp"
        android:layout_gravity="center_horizontal"
        android:layout_marginTop="16dp"
        android:background="?attr/signal_icon_tint_tab_unselected"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"/>

    <TextView
        android:id="@+id/pinned_message_header"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toBottomOf="@id/anchor"
        android:layout_marginVertical="16dp"
        android:text="@string/PinnedMessage__pinned_messages"
        android:textAppearance="@style/Signal.Text.TitleMedium" />

    <FrameLayout
        android:id="@+id/video_container"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:layout_constraintBottom_toBottomOf="@id/pinned_list"
        app:layout_constraintEnd_toEndOf="@id/pinned_list"
        app:layout_constraintStart_toStartOf="@id/pinned_list"
        app:layout_constraintTop_toTopOf="@id/pinned_list" />

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/pinned_list"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:clipToPadding="false"
        app:layout_constrainedHeight="true"
        app:layout_constraintTop_toBottomOf="@id/pinned_message_header"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintBottom_toTopOf="@+id/unpin_all_container" />

    <FrameLayout
        android:id="@+id/unpin_all_container"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="?attr/colorSurfaceContainer"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintBottom_toBottomOf="parent">

        <com.google.android.material.button.MaterialButton
            android:id="@+id/unpin_all"
            style="@style/Signal.Widget.Button.Large.Tonal"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginVertical="8dp"
            android:layout_marginHorizontal="32dp"
            android:text="@string/PinnedMessage__unpin_all_messages" />

    </FrameLayout>

</androidx.constraintlayout.widget.ConstraintLayout>
