<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
	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/custom_selectable_item_background">

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

		<com.google.android.material.imageview.ShapeableImageView
			android:id="@+id/imageView_cover"
			android:layout_width="0dp"
			android:layout_height="118dp"
			android:background="?colorSurfaceContainer"
			android:scaleType="centerCrop"
			app:layout_constraintBottom_toBottomOf="parent"
			app:layout_constraintDimensionRatio="2:3"
			app:layout_constraintStart_toStartOf="parent"
			app:layout_constraintTop_toTopOf="parent"
			app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.Kotatsu.Cover.Medium"
			tools:src="@tools:sample/backgrounds/scenic" />

		<org.koitharu.kotatsu.history.ui.util.ReadingProgressView
			android:id="@+id/progressView"
			android:layout_width="@dimen/card_indicator_size"
			android:layout_height="@dimen/card_indicator_size"
			android:layout_margin="@dimen/card_indicator_offset"
			app:layout_constraintBottom_toBottomOf="@id/imageView_cover"
			app:layout_constraintEnd_toEndOf="@id/imageView_cover" />

		<org.koitharu.kotatsu.core.ui.widgets.IconsView
			android:id="@+id/iconsView"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_marginTop="10dp"
			android:background="@drawable/bg_list_icons"
			android:orientation="horizontal"
			android:padding="4dp"
			app:iconSize="14dp"
			app:iconSpacing="4dp"
			app:layout_constraintStart_toStartOf="@id/imageView_cover"
			app:layout_constraintTop_toTopOf="@id/imageView_cover" />

		<LinearLayout
			android:layout_width="0dp"
			android:layout_height="0dp"
			android:layout_marginStart="16dp"
			android:layout_marginEnd="12dp"
			android:orientation="vertical"
			app:layout_constraintBottom_toBottomOf="parent"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintStart_toEndOf="@+id/imageView_cover"
			app:layout_constraintTop_toTopOf="parent">

			<TextView
				android:id="@+id/textView_title"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:ellipsize="end"
				android:maxLines="3"
				android:textAppearance="?attr/textAppearanceBodyLarge"
				app:lineHeight="18dp"
				tools:text="@tools:sample/lorem/random" />

			<TextView
				android:id="@+id/textView_author"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:layout_marginTop="4dp"
				android:ellipsize="end"
				android:gravity="center_vertical"
				android:maxLines="1"
				android:textAppearance="?attr/textAppearanceBodyMedium"
				app:layout_constraintEnd_toEndOf="parent"
				app:layout_constraintStart_toEndOf="@+id/imageView_cover"
				app:layout_constraintTop_toBottomOf="@+id/textView_title"
				tools:text="@tools:sample/lorem/random" />

			<TextView
				android:id="@+id/textView_tags"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:layout_marginTop="4dp"
				android:ellipsize="end"
				android:gravity="center_vertical"
				android:maxLines="2"
				android:textAppearance="?attr/textAppearanceBodySmall"
				app:layout_constraintEnd_toEndOf="parent"
				app:layout_constraintStart_toEndOf="@+id/imageView_cover"
				app:layout_constraintTop_toBottomOf="@+id/textView_author"
				app:lineHeight="14dp"
				tools:text="@tools:sample/lorem/random" />

		</LinearLayout>

		<org.koitharu.kotatsu.core.ui.widgets.BadgeView
			android:id="@+id/badge"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_margin="@dimen/margin_small"
			android:visibility="gone"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintTop_toTopOf="parent"
			app:maxCharacterCount="@integer/manga_badge_max_character_count"
			tools:number="8"
			tools:visibility="visible" />

	</androidx.constraintlayout.widget.ConstraintLayout>

</FrameLayout>
