<?xml version="1.0" encoding="utf-8"?>
<layout
    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">
    <data>
        <variable
            name="section"
            type="com.visticsolution.posterbanao.model.SectionModel" />
    </data>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:id="@+id/main_constraint"
        android:layoutAnimation="@anim/rc_animation"
        android:background="@color/transparent"
        android:layout_height="wrap_content">
        <TextView
            android:id="@+id/title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentStart="true"
            android:layout_centerVertical="true"
            android:layout_margin="8dp"
            android:text="@{section.name}"
            android:maxLength="25"
            android:textSize="@dimen/_18sdp"
            android:ellipsize="end"
            android:textColor="@color/black"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <com.airbnb.lottie.LottieAnimationView
            android:id="@+id/animation_view"
            android:layout_width="50dp"
            android:layout_height="40dp"
            android:layout_centerVertical="true"
            android:layout_toEndOf="@id/title"
            app:layout_constraintBottom_toBottomOf="@+id/countAndSave"
            app:layout_constraintStart_toEndOf="@+id/title"
            app:layout_constraintTop_toTopOf="@+id/title"
            app:lottie_autoPlay="true"
            app:lottie_rawRes="@raw/new_label"
            app:lottie_loop="true" />


        <TextView
            android:id="@+id/countAndSave"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentEnd="true"
            android:layout_centerVertical="true"
            android:padding="2dp"
            android:layout_marginRight="8dp"
            android:drawableRight="@drawable/ic_arrow_right"
            android:text="@string/view_all"
            android:textColor="@color/app_color"
            android:textSize="13dp"
            app:layout_constraintBottom_toBottomOf="@+id/title"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="@+id/title" />

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/horizontal_recylerview"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginVertical="5dp"
            android:orientation="horizontal"
            app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/title" />

    </androidx.constraintlayout.widget.ConstraintLayout>

</layout>
