<?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:layout_width="match_parent"
	android:layout_height="match_parent"
	android:clipToPadding="false"
	android:scrollbars="vertical"
	app:layout_behavior="@string/appbar_scrolling_view_behavior">

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

		<LinearLayout
			android:id="@+id/main_container"
			android:layout_width="match_parent"
			android:layout_height="0dp"
			android:layout_margin="8dp"
			android:gravity="center_horizontal"
			android:orientation="horizontal"
			android:weightSum="3"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintStart_toStartOf="parent"
			app:layout_constraintTop_toTopOf="parent">

			<com.google.android.material.card.MaterialCardView
				android:id="@+id/cover_card"
				android:layout_width="0dp"
				android:layout_height="wrap_content"
				android:layout_margin="8dp"
				android:layout_weight="1">

				<org.koitharu.kotatsu.base.ui.widgets.CoverImageView
					android:id="@+id/imageView_cover"
					android:layout_width="match_parent"
					android:layout_height="wrap_content"
					android:orientation="horizontal"
					android:scaleType="centerCrop"
					android:transitionName="cover"
					tools:background="@tools:sample/backgrounds/scenic"
					tools:ignore="ContentDescription" />

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

			<androidx.constraintlayout.widget.ConstraintLayout
				android:id="@+id/text_container"
				android:layout_width="0dp"
				android:layout_height="wrap_content"
				android:layout_margin="8dp"
				android:layout_weight="2">

				<TextView
					android:id="@+id/textView_title"
					android:layout_width="0dp"
					android:layout_height="wrap_content"
					android:ellipsize="end"
					android:textAppearance="?attr/textAppearanceHeadlineSmall"
					app:layout_constraintEnd_toEndOf="parent"
					app:layout_constraintStart_toStartOf="parent"
					app:layout_constraintTop_toTopOf="parent"
					tools:text="@tools:sample/lorem[15]" />

				<TextView
					android:id="@+id/textView_subtitle"
					android:layout_width="0dp"
					android:layout_height="wrap_content"
					android:layout_marginTop="4dp"
					android:ellipsize="end"
					android:textAppearance="?attr/textAppearanceBodyMedium"
					app:layout_constraintEnd_toEndOf="@id/textView_title"
					app:layout_constraintStart_toStartOf="parent"
					app:layout_constraintTop_toBottomOf="@id/textView_title"
					tools:text="@tools:sample/lorem[12]" />

				<TextView
					android:id="@+id/textView_author"
					android:layout_width="0dp"
					android:layout_height="wrap_content"
					android:layout_marginTop="4dp"
					android:background="@drawable/list_selector"
					android:requiresFadingEdge="horizontal"
					android:textColor="?attr/colorTertiary"
					android:textStyle="bold"
					app:layout_constraintEnd_toEndOf="@id/textView_title"
					app:layout_constraintHorizontal_bias="0"
					app:layout_constraintStart_toStartOf="@id/textView_title"
					app:layout_constraintTop_toBottomOf="@id/textView_subtitle"
					app:layout_constraintWidth_default="wrap"
					tools:text="@tools:sample/full_names" />

				<TextView
					android:id="@+id/textView_state"
					android:layout_width="0dp"
					android:layout_height="wrap_content"
					android:layout_marginTop="4dp"
					android:drawablePadding="4dp"
					android:textAppearance="?attr/textAppearanceBodySmall"
					app:layout_constraintEnd_toEndOf="@id/textView_title"
					app:layout_constraintStart_toStartOf="@id/textView_title"
					app:layout_constraintTop_toBottomOf="@id/textView_author"
					tools:drawableStart="@drawable/ic_state_finished"
					tools:text="Finished" />

			</androidx.constraintlayout.widget.ConstraintLayout>

		</LinearLayout>

		<LinearLayout
			android:id="@+id/info_layout"
			android:layout_width="match_parent"
			android:layout_height="wrap_content"
			android:baselineAligned="false"
			android:divider="?attr/colorOutline"
			android:dividerPadding="8dp"
			android:orientation="horizontal"
			android:paddingStart="8dp"
			android:paddingEnd="8dp"
			android:showDividers="middle"
			app:layout_constraintTop_toBottomOf="@+id/main_container">

			<LinearLayout
				android:id="@+id/rating_container"
				android:layout_width="0dp"
				android:layout_height="wrap_content"
				android:layout_gravity="center"
				android:layout_weight="1"
				android:gravity="center">

				<TextView
					android:id="@+id/textView_rating"
					android:layout_width="wrap_content"
					android:layout_height="wrap_content"
					android:drawablePadding="4dp"
					android:padding="4dp"
					android:textSize="20sp"
					app:drawableEndCompat="@drawable/ic_star_manga_info"
					tools:text="4.8" />

			</LinearLayout>

			<LinearLayout
				android:id="@+id/chapters_container"
				android:layout_width="0dp"
				android:layout_height="wrap_content"
				android:layout_gravity="center"
				android:layout_weight="1"
				android:gravity="center">

				<TextView
					android:id="@+id/textView_chapters"
					android:layout_width="wrap_content"
					android:layout_height="wrap_content"
					android:drawablePadding="4dp"
					android:gravity="center_horizontal"
					android:padding="4dp"
					android:textSize="12sp"
					app:drawableTopCompat="@drawable/ic_book_page"
					tools:text="52 chapters" />

			</LinearLayout>

			<LinearLayout
				android:id="@+id/source_container"
				android:layout_width="0dp"
				android:layout_height="wrap_content"
				android:layout_gravity="center"
				android:layout_weight="1"
				android:gravity="center">

				<TextView
					android:id="@+id/textView_source"
					android:layout_width="wrap_content"
					android:layout_height="wrap_content"
					android:drawablePadding="4dp"
					android:gravity="center_horizontal"
					android:padding="4dp"
					android:textSize="12sp"
					app:drawableTopCompat="@drawable/ic_web"
					tools:text="Source" />

			</LinearLayout>

			<LinearLayout
				android:id="@+id/size_container"
				android:layout_width="0dp"
				android:layout_height="wrap_content"
				android:layout_gravity="center"
				android:layout_weight="1"
				android:gravity="center">

				<TextView
					android:id="@+id/textView_size"
					android:layout_width="wrap_content"
					android:layout_height="wrap_content"
					android:drawablePadding="4dp"
					android:gravity="center_horizontal"
					android:padding="4dp"
					android:textSize="12sp"
					app:drawableTopCompat="@drawable/ic_storage"
					tools:text="1.8 GiB" />

			</LinearLayout>

		</LinearLayout>

		<LinearLayout
			android:id="@+id/buttons_layout"
			android:layout_width="match_parent"
			android:layout_height="48dp"
			android:gravity="center"
			android:orientation="horizontal"
			android:paddingStart="16dp"
			android:paddingEnd="16dp"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintStart_toStartOf="parent"
			app:layout_constraintTop_toBottomOf="@id/info_layout">

			<com.google.android.material.button.MaterialButton
				android:id="@+id/button_favorite"
				style="@style/Widget.Material3.Button.OutlinedButton"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:layout_weight="1"
				app:icon="@drawable/ic_heart_outline"
				app:iconGravity="textTop"
				app:iconPadding="0dp" />

			<com.google.android.material.button.MaterialButton
				android:id="@+id/button_read"
				style="@style/Widget.Material3.Button.TonalButton"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:layout_marginStart="16dp"
				android:layout_weight="1"
				android:enabled="false"
				android:text="@string/read"
				android:textAllCaps="false"
				app:elevation="0dp"
				app:iconGravity="textStart"
				app:iconPadding="8dp"
				tools:text="@string/_continue" />

		</LinearLayout>

		<org.koitharu.kotatsu.base.ui.widgets.ChipsView
			android:id="@+id/chips_tags"
			android:layout_width="0dp"
			android:layout_height="wrap_content"
			android:layout_marginTop="8dp"
			android:paddingStart="16dp"
			android:paddingEnd="16dp"
			app:chipSpacingHorizontal="6dp"
			app:chipSpacingVertical="6dp"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintStart_toStartOf="parent"
			app:layout_constraintTop_toBottomOf="@+id/buttons_layout" />

		<TextView
			android:id="@+id/textView_description"
			android:layout_width="0dp"
			android:layout_height="match_parent"
			android:layout_marginStart="16dp"
			android:layout_marginEnd="16dp"
			android:layout_marginBottom="16dp"
			android:layout_marginTop="8dp"
			android:lineSpacingMultiplier="1.2"
			android:textIsSelectable="true"
			android:textAppearance="?attr/textAppearanceBodyMedium"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintStart_toStartOf="parent"
			app:layout_constraintTop_toBottomOf="@id/chips_tags"
			app:layout_constraintBottom_toBottomOf="parent"
			tools:ignore="UnusedAttribute"
			tools:text="@tools:sample/lorem/random[25]" />

		<com.google.android.material.progressindicator.LinearProgressIndicator
			android:id="@+id/progressBar"
			android:layout_width="0dp"
			android:layout_height="wrap_content"
			android:indeterminate="true"
			android:visibility="gone"
			app:hideAnimationBehavior="outward"
			app:layout_constraintBottom_toTopOf="parent"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintStart_toStartOf="parent"
			app:layout_constraintTop_toTopOf="parent"
			app:showAnimationBehavior="inward"
			tools:visibility="visible" />

	</androidx.constraintlayout.widget.ConstraintLayout>

</androidx.core.widget.NestedScrollView>