<?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:background="@drawable/conversation_list_item_background"
    android:paddingStart="@dimen/dsl_settings_gutter"
    android:paddingTop="12dp"
    android:paddingEnd="@dimen/dsl_settings_gutter"
    android:paddingBottom="12dp">

    <com.google.android.material.imageview.ShapeableImageView
        android:id="@+id/story"
        android:layout_width="@dimen/stories_landing_item_thumb_width"
        android:layout_height="@dimen/stories_landing_item_thumb_height"
        android:background="@color/signal_background_primary"
        android:transitionName="story"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:shapeAppearance="@style/ShapeAppearanceOverlay.Signal.Story.Preview"
        tools:src="@drawable/test_gradient" />

    <com.google.android.material.imageview.ShapeableImageView
        android:id="@+id/story_blur"
        android:layout_width="@dimen/stories_landing_item_thumb_width"
        android:layout_height="@dimen/stories_landing_item_thumb_height"
        android:background="@color/signal_background_primary"
        android:transitionName="story"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:shapeAppearance="@style/ShapeAppearanceOverlay.Signal.Story.Preview"
        tools:src="@drawable/test_gradient" />

    <org.thoughtcrime.securesms.components.emoji.EmojiTextView
        android:id="@+id/view_count"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginEnd="16dp"
        android:textAppearance="@style/Signal.Text.BodyLarge"
        app:layout_constraintBottom_toTopOf="@id/date"
        app:layout_constraintStart_toEndOf="@+id/error_indicator"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_chainStyle="packed"
        app:layout_goneMarginStart="20dp"
        tools:text="12 views" />

    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/error_indicator"
        android:layout_width="14dp"
        android:layout_height="14dp"
        android:layout_marginStart="16dp"
        android:importantForAccessibility="no"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="@id/date"
        app:layout_constraintStart_toEndOf="@id/story"
        app:layout_constraintTop_toTopOf="@+id/view_count"
        app:srcCompat="@drawable/ic_error_outline_24"
        app:tint="@color/signal_colorError"
        tools:visibility="visible" />

    <TextView
        android:id="@+id/date"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:textAppearance="@style/Signal.Text.BodyMedium"
        android:textColor="@color/signal_text_secondary"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="@+id/view_count"
        app:layout_constraintTop_toBottomOf="@id/view_count"
        app:layout_goneMarginStart="16dp"
        tools:text="10m" />

    <View
        android:id="@+id/download_touch"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:background="?selectableItemBackgroundBorderless"
        app:layout_constraintBottom_toBottomOf="@id/download"
        app:layout_constraintEnd_toEndOf="@id/download"
        app:layout_constraintStart_toStartOf="@id/download"
        app:layout_constraintTop_toTopOf="@id/download" />

    <View
        android:id="@+id/more_touch"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:background="?selectableItemBackgroundBorderless"
        app:layout_constraintBottom_toBottomOf="@id/more"
        app:layout_constraintEnd_toEndOf="@id/more"
        app:layout_constraintStart_toStartOf="@id/more"
        app:layout_constraintTop_toTopOf="@id/more" />

    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/download"
        android:layout_width="32dp"
        android:layout_height="32dp"
        android:layout_marginEnd="24dp"
        android:background="@drawable/circle_tintable"
        android:scaleType="centerInside"
        app:backgroundTint="@color/signal_colorSecondaryContainer"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@id/more"
        app:layout_constraintTop_toTopOf="parent"
        app:srcCompat="@drawable/ic_save_24"
        app:tint="@color/signal_colorOnSecondaryContainer" />

    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/more"
        android:layout_width="32dp"
        android:layout_height="32dp"
        android:background="@drawable/circle_tintable"
        android:scaleType="centerInside"
        app:backgroundTint="@color/signal_colorSecondaryContainer"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:srcCompat="@drawable/ic_more_vert_24"
        app:tint="@color/signal_colorOnSecondaryContainer" />

</androidx.constraintlayout.widget.ConstraintLayout>