<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView
	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:clipToPadding="false"
	android:layout_width="match_parent"
	android:layout_height="wrap_content">

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

		<ImageView
			android:id="@+id/imageView_cover"
			android:layout_width="0dp"
			android:layout_height="0dp"
			android:layout_marginStart="8dp"
			android:layout_marginTop="8dp"
			android:scaleType="fitCenter"
			app:layout_constraintDimensionRatio="13:18"
			app:layout_constraintStart_toStartOf="parent"
			app:layout_constraintTop_toTopOf="parent"
			app:layout_constraintWidth_percent="0.3" />

		<org.koitharu.kotatsu.base.ui.widgets.ChipsView
			android:id="@+id/chips_tags"
			android:layout_width="0dp"
			android:layout_height="wrap_content"
			android:layout_marginTop="4dp"
			android:padding="6dp"
			app:chipSpacingHorizontal="4dp"
			app:chipSpacingVertical="6dp"
			app:layout_constraintEnd_toEndOf="@id/imageView_cover"
			app:layout_constraintStart_toStartOf="@id/imageView_cover"
			app:layout_constraintTop_toBottomOf="@id/imageView_cover" />

		<TextView
			android:id="@+id/textView_title"
			android:layout_width="0dp"
			android:layout_height="wrap_content"
			android:layout_marginStart="8dp"
			android:layout_marginTop="8dp"
			android:layout_marginEnd="8dp"
			android:maxLines="3"
			android:textAppearance="@style/TextAppearance.AppCompat.Body2"
			android:textColor="?android:textColorPrimary"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintStart_toEndOf="@id/imageView_cover"
			app:layout_constraintTop_toTopOf="parent"
			tools:text="@tools:sample/lorem[20]" />

		<TextView
			android:id="@+id/textView_subtitle"
			android:layout_width="0dp"
			android:layout_height="wrap_content"
			android:layout_marginTop="4dp"
			android:maxLines="2"
			android:textAppearance="@style/TextAppearance.AppCompat.Body1"
			android:textColor="?android:textColorSecondary"
			app:layout_constraintEnd_toEndOf="@id/textView_title"
			app:layout_constraintStart_toStartOf="@id/textView_title"
			app:layout_constraintTop_toBottomOf="@id/textView_title"
			tools:text="@tools:sample/lorem[20]" />

		<RatingBar
			android:id="@+id/ratingBar"
			style="@style/Widget.AppCompat.RatingBar.Small"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_marginTop="10dp"
			android:isIndicator="true"
			android:max="100"
			app:layout_constraintStart_toStartOf="@id/textView_title"
			app:layout_constraintTop_toBottomOf="@id/textView_subtitle"
			tools:progress="70" />

		<com.google.android.material.button.MaterialButton
			android:id="@+id/button_read"
			style="@style/Widget.MaterialComponents.Button.OutlinedButton"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_marginEnd="4dp"
			android:enabled="false"
			android:text="@string/read"
			app:icon="@drawable/ic_read"
			app:iconPadding="12dp"
			app:layout_constraintEnd_toEndOf="@id/textView_title"
			app:layout_constraintTop_toBottomOf="@id/ratingBar" />

		<ImageView
			android:id="@+id/imageView_favourite"
			android:layout_width="0dp"
			android:layout_height="0dp"
			android:layout_marginEnd="4dp"
			android:background="?selectableItemBackgroundBorderless"
			android:contentDescription="@string/add_to_favourites"
			android:scaleType="center"
			android:src="@drawable/ic_heart_outline"
			app:layout_constraintBottom_toBottomOf="@id/button_read"
			app:layout_constraintDimensionRatio="1:1"
			app:layout_constraintEnd_toStartOf="@id/button_read"
			app:layout_constraintTop_toTopOf="@id/button_read"
			app:tint="?colorAccent" />

		<View
			android:id="@+id/divider_top"
			android:layout_width="0dp"
			android:layout_height="1dp"
			android:layout_marginTop="8dp"
			android:background="?android:listDivider"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintStart_toEndOf="@id/imageView_cover"
			app:layout_constraintTop_toBottomOf="@id/button_read" />

		<TextView
			android:id="@+id/textView_description"
			android:layout_width="0dp"
			android:layout_height="wrap_content"
			android:justificationMode="inter_word"
			android:lineSpacingMultiplier="1.2"
			android:padding="12dp"
			android:textIsSelectable="true"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintStart_toEndOf="@id/imageView_cover"
			app:layout_constraintTop_toBottomOf="@id/divider_top"
			tools:ignore="UnusedAttribute"
			tools:text="@tools:sample/lorem/random" />

		<ProgressBar
			android:id="@+id/progressBar"
			style="@style/Widget.AppCompat.ProgressBar.Horizontal"
			android:layout_width="0dp"
			android:layout_height="wrap_content"
			android:indeterminate="true"
			android:visibility="gone"
			app:layout_constraintBottom_toBottomOf="@id/divider_top"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintStart_toEndOf="@id/imageView_cover"
			app:layout_constraintTop_toBottomOf="@id/divider_top"
			tools:visibility="visible" />

	</androidx.constraintlayout.widget.ConstraintLayout>

</androidx.core.widget.NestedScrollView>