<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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="56dp"
    android:layout_gravity="center_vertical"
    android:background="@drawable/list_item_selector_background"
    android:paddingHorizontal="8dp">

    <com.google.android.material.imageview.ShapeableImageView
        android:id="@+id/thumbnail"
        android:layout_width="56dp"
        android:layout_height="56dp"
        android:layout_gravity="center_vertical"
        android:padding="8dp"
        android:scaleType="centerCrop"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:shapeAppearance="@style/ShapeAppearanceOverlay.Cover"
        tools:src="@mipmap/ic_launcher" />

    <TextView
        android:id="@+id/title"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        android:ellipsize="end"
        android:maxLines="1"
        android:textAppearance="?attr/textAppearanceSubtitle1"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@+id/badges"
        app:layout_constraintHorizontal_bias="0.007"
        app:layout_constraintStart_toEndOf="@+id/thumbnail"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.523"
        tools:text="Manga title" />

    <LinearLayout
        android:id="@+id/badges"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="8dp"
        android:background="@drawable/rounded_rectangle"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <TextView
            android:id="@+id/local_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="?attr/colorTertiary"
            android:maxLines="1"
            android:paddingStart="3dp"
            android:paddingTop="1dp"
            android:paddingEnd="3dp"
            android:paddingBottom="1dp"
            android:text="@string/local_source_badge"
            android:textAppearance="?attr/textAppearanceCaption"
            android:textColor="?attr/colorOnTertiary"
            android:visibility="gone"
            tools:visibility="visible" />

        <TextView
            android:id="@+id/download_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="?attr/colorTertiary"
            android:maxLines="1"
            android:paddingStart="3dp"
            android:paddingTop="1dp"
            android:paddingEnd="3dp"
            android:paddingBottom="1dp"
            android:textAppearance="?attr/textAppearanceCaption"
            android:textColor="?attr/colorOnTertiary"
            android:visibility="gone"
            tools:text="122"
            tools:visibility="visible" />

        <TextView
            android:id="@+id/unread_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="?attr/colorSecondary"
            android:maxLines="1"
            android:paddingStart="3dp"
            android:paddingTop="1dp"
            android:paddingEnd="3dp"
            android:paddingBottom="1dp"
            android:textAppearance="?attr/textAppearanceCaption"
            android:textColor="?attr/colorOnSecondary"
            android:visibility="gone"
            tools:text="130"
            tools:visibility="visible" />

        <TextView
            android:id="@+id/favorite_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="?attr/colorSecondary"
            android:maxLines="1"
            android:paddingStart="3dp"
            android:paddingTop="1dp"
            android:paddingEnd="3dp"
            android:paddingBottom="1dp"
            android:text="@string/in_library"
            android:textAppearance="?attr/textAppearanceCaption"
            android:textColor="?attr/colorOnSecondary"
            android:visibility="gone"
            tools:visibility="visible" />

        <TextView
            android:id="@+id/language_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="?attr/colorTertiary"
            android:maxLines="1"
            android:paddingStart="3dp"
            android:paddingTop="1dp"
            android:paddingEnd="3dp"
            android:paddingBottom="1dp"
            tools:text="EN"
            android:textAppearance="?attr/textAppearanceCaption"
            android:textColor="?attr/colorOnTertiary"
            android:visibility="gone"
            tools:visibility="visible" />

    </LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>
