<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView 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"
	style="?materialCardViewFilledStyle"
	android:layout_width="match_parent"
	android:layout_height="wrap_content"
	android:layout_marginVertical="@dimen/margin_small"
	android:layout_marginStart="@dimen/margin_medium"
	android:layout_marginEnd="@dimen/margin_medium">

	<androidx.constraintlayout.widget.ConstraintLayout
		android:layout_width="match_parent"
		android:layout_height="wrap_content">

		<TextView
			android:id="@+id/name"
			android:layout_width="0dp"
			android:layout_height="wrap_content"
			android:layout_marginVertical="@dimen/margin_small"
			android:ellipsize="end"
			android:maxLines="1"
			android:textAppearance="?textAppearanceHeadline6"
			app:layout_constraintBottom_toBottomOf="parent"
			app:layout_constraintEnd_toEndOf="@+id/image"
			app:layout_constraintStart_toStartOf="@+id/image"
			app:layout_constraintTop_toBottomOf="@+id/image"
			tools:text="A delicious cake" />

		<com.google.android.material.imageview.ShapeableImageView
			android:id="@+id/image"
			android:layout_width="0dp"
			android:layout_height="0dp"
			android:layout_marginHorizontal="@dimen/margin_medium"
			android:contentDescription="@string/content_description_view_holder_recipe_image"
			android:scaleType="centerCrop"
			app:layout_constraintBottom_toTopOf="@+id/name"
			app:layout_constraintDimensionRatio="2:1"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintStart_toStartOf="parent"
			app:layout_constraintTop_toBottomOf="@id/delete_icon"
			app:layout_constraintVertical_chainStyle="packed"
			app:shapeAppearance="?shapeAppearanceCornerMedium"
			tools:srcCompat="@drawable/placeholder_recipe" />

		<ImageView
			android:id="@+id/favorite_icon"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_marginVertical="@dimen/margin_small"
			android:contentDescription="@string/view_holder_recipe_favorite_content_description"
			app:layout_constraintBottom_toTopOf="@+id/image"
			app:layout_constraintEnd_toEndOf="@id/image"
			app:layout_constraintTop_toTopOf="parent"
			tools:srcCompat="@drawable/ic_favorite_unfilled"
			tools:visibility="visible" />

		<ImageView
			android:id="@+id/delete_icon"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_marginHorizontal="@dimen/margin_medium"
			android:layout_marginVertical="@dimen/margin_small"
			android:contentDescription="@string/view_holder_recipe_delete_content_description"
			app:layout_constraintBottom_toTopOf="@+id/image"
			app:layout_constraintEnd_toStartOf="@id/favorite_icon"
			app:layout_constraintTop_toTopOf="parent"
			app:layout_goneMarginEnd="0dp"
			app:srcCompat="@drawable/ic_delete" />
	</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>