<?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"
	android:layout_width="match_parent"
	android:layout_height="wrap_content"
	app:cardCornerRadius="16dp">

	<androidx.constraintlayout.widget.ConstraintLayout
		android:layout_width="match_parent"
		android:layout_height="match_parent"
		android:minHeight="@dimen/manga_list_details_item_height"
		android:orientation="horizontal"
		android:padding="4dp">

		<com.google.android.material.imageview.ShapeableImageView
			android:id="@+id/imageView_cover"
			android:layout_width="92dp"
			android:layout_height="0dp"
			android:orientation="vertical"
			android:scaleType="centerCrop"
			app:layout_constraintDimensionRatio="H,13:18"
			app:layout_constraintStart_toStartOf="parent"
			app:layout_constraintTop_toTopOf="parent"
			app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.Kotatsu.Cover"
			tools:src="@sample/covers" />

		<TextView
			android:id="@+id/textView_title"
			android:layout_width="0dp"
			android:layout_height="wrap_content"
			android:layout_marginStart="16dp"
			android:layout_marginTop="4dp"
			android:layout_marginEnd="8dp"
			android:ellipsize="end"
			android:singleLine="true"
			android:textAppearance="?attr/textAppearanceTitleSmall"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintStart_toEndOf="@id/imageView_cover"
			app:layout_constraintTop_toTopOf="parent"
			tools:text="@sample/titles" />

		<com.google.android.material.progressindicator.LinearProgressIndicator
			android:id="@+id/progressBar"
			android:layout_width="0dp"
			android:layout_height="wrap_content"
			android:layout_marginStart="16dp"
			android:layout_marginTop="4dp"
			android:layout_marginEnd="8dp"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintStart_toEndOf="@id/imageView_cover"
			app:layout_constraintTop_toBottomOf="@id/textView_title"
			tools:progress="25"/>

		<TextView
			android:id="@+id/textView_status"
			android:layout_width="0dp"
			android:layout_height="wrap_content"
			android:layout_marginStart="16dp"
			android:layout_marginTop="4dp"
			android:layout_marginEnd="8dp"
			android:ellipsize="end"
			android:singleLine="true"
			android:textAppearance="?attr/textAppearanceBodySmall"
			app:layout_constraintEnd_toStartOf="@id/textView_percent"
			app:layout_constraintStart_toEndOf="@id/imageView_cover"
			app:layout_constraintTop_toBottomOf="@id/progressBar"
			tools:text="@string/manga_downloading_" />

		<TextView
			android:id="@+id/textView_percent"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_marginEnd="8dp"
			android:textAppearance="?attr/textAppearanceBodyMedium"
			app:layout_constraintBaseline_toBaselineOf="@id/textView_status"
			app:layout_constraintEnd_toEndOf="parent"
			tools:text="25%" />

		<TextView
			android:id="@+id/textView_details"
			android:layout_width="0dp"
			android:layout_height="wrap_content"
			android:layout_marginStart="16dp"
			android:layout_marginTop="4dp"
			android:layout_marginEnd="8dp"
			android:ellipsize="end"
			android:maxLines="4"
			android:textAppearance="?attr/textAppearanceBodySmall"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintStart_toEndOf="@id/imageView_cover"
			app:layout_constraintTop_toBottomOf="@id/textView_status"
			tools:text="@tools:sample/lorem[3]" />

		<Button
			android:id="@+id/button_resume"
			style="@style/Widget.Material3.Button.TextButton"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:text="@string/try_again"
			android:visibility="gone"
			app:layout_constraintBottom_toBottomOf="parent"
			app:layout_constraintEnd_toStartOf="@id/button_cancel"
			app:layout_constraintTop_toBottomOf="@id/textView_details"
			app:layout_constraintVertical_bias="1"
			tools:visibility="visible" />

		<Button
			android:id="@+id/button_cancel"
			style="@style/Widget.Material3.Button.TextButton"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:text="@android:string/cancel"
			android:visibility="gone"
			app:layout_constraintBottom_toBottomOf="parent"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintTop_toBottomOf="@id/textView_details"
			app:layout_constraintVertical_bias="1"
			tools:visibility="visible" />

	</androidx.constraintlayout.widget.ConstraintLayout>

</com.google.android.material.card.MaterialCardView>
