<?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="wrap_content"
    android:layout_marginVertical="2dp"
    android:clipToPadding="false"
    android:paddingHorizontal="12dp">

    <com.google.android.material.card.MaterialCardView
        android:id="@+id/dashboard_horizontal_group_item_lucky_container"
        android:layout_width="0dp"
        android:layout_height="44dp"
        android:layout_marginVertical="4dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@id/dashboard_horizontal_group_item_message_container"
        app:layout_constraintHorizontal_chainStyle="spread_inside"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

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

            <ImageView
                android:id="@+id/dashboard_horizontal_group_item_lucky_icon"
                android:layout_width="28dp"
                android:layout_height="28dp"
                android:layout_marginStart="12dp"
                android:layout_marginTop="8dp"
                android:layout_marginBottom="8dp"
                android:src="@drawable/ic_more_lucky_number"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toStartOf="@id/dashboard_horizontal_group_item_lucky_value"
                app:layout_constraintHorizontal_chainStyle="packed"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_goneMarginEnd="16dp"
                app:tint="?colorOnSurface"
                tools:ignore="ContentDescription" />

            <ImageView
                android:id="@+id/dashboard_horizontal_group_item_lucky_error"
                android:layout_width="18dp"
                android:layout_height="18dp"
                android:layout_marginEnd="-4dp"
                android:layout_marginBottom="-4dp"
                android:background="@drawable/ic_circle"
                android:backgroundTint="?attr/colorSurface"
                android:contentDescription="@string/error_unknown"
                android:src="@drawable/ic_error_filled"
                app:layout_constraintBottom_toBottomOf="@id/dashboard_horizontal_group_item_lucky_icon"
                app:layout_constraintEnd_toEndOf="@id/dashboard_horizontal_group_item_lucky_icon"
                app:tint="?colorError"
                tools:visibility="visible" />

            <TextView
                android:id="@+id/dashboard_horizontal_group_item_lucky_value"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="6dp"
                android:layout_marginTop="8dp"
                android:layout_marginEnd="16dp"
                android:layout_marginBottom="8dp"
                android:includeFontPadding="false"
                android:maxLines="1"
                android:textSize="20sp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toEndOf="@id/dashboard_horizontal_group_item_lucky_icon"
                app:layout_constraintTop_toTopOf="parent"
                tools:text="16" />
        </androidx.constraintlayout.widget.ConstraintLayout>
    </com.google.android.material.card.MaterialCardView>

    <com.google.android.material.card.MaterialCardView
        android:id="@+id/dashboard_horizontal_group_item_message_container"
        android:layout_width="0dp"
        android:layout_height="44dp"
        android:layout_marginVertical="4dp"
        android:layout_marginEnd="8dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@id/dashboard_horizontal_group_item_attendance_container"
        app:layout_constraintStart_toEndOf="@id/dashboard_horizontal_group_item_lucky_container"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_goneMarginEnd="0dp">

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

            <ImageView
                android:id="@+id/dashboard_horizontal_group_item_message_icon"
                android:layout_width="28dp"
                android:layout_height="28dp"
                android:layout_marginStart="16dp"
                android:layout_marginTop="8dp"
                android:layout_marginBottom="8dp"
                android:src="@drawable/ic_more_messages"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toStartOf="@id/dashboard_horizontal_group_item_message_value"
                app:layout_constraintHorizontal_chainStyle="packed"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_goneMarginEnd="16dp"
                app:tint="?colorOnSurface"
                tools:ignore="ContentDescription" />

            <ImageView
                android:id="@+id/dashboard_horizontal_group_item_message_error"
                android:layout_width="18dp"
                android:layout_height="18dp"
                android:layout_marginEnd="-4dp"
                android:layout_marginBottom="-4dp"
                android:background="@drawable/ic_circle"
                android:backgroundTint="?attr/colorSurface"
                android:contentDescription="@string/error_unknown"
                android:src="@drawable/ic_error_filled"
                app:layout_constraintBottom_toBottomOf="@id/dashboard_horizontal_group_item_message_icon"
                app:layout_constraintEnd_toEndOf="@id/dashboard_horizontal_group_item_message_icon"
                app:tint="?colorError"
                tools:visibility="visible" />

            <TextView
                android:id="@+id/dashboard_horizontal_group_item_message_value"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="6dp"
                android:layout_marginTop="8dp"
                android:layout_marginEnd="16dp"
                android:layout_marginBottom="8dp"
                android:includeFontPadding="false"
                android:textSize="20sp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toEndOf="@id/dashboard_horizontal_group_item_message_icon"
                app:layout_constraintTop_toTopOf="parent"
                tools:text="16"
                tools:visibility="visible" />
        </androidx.constraintlayout.widget.ConstraintLayout>
    </com.google.android.material.card.MaterialCardView>

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/guideline"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical" />

    <com.google.android.material.card.MaterialCardView
        android:id="@+id/dashboard_horizontal_group_item_attendance_container"
        android:layout_width="0dp"
        android:layout_height="44dp"
        android:layout_marginVertical="4dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/dashboard_horizontal_group_item_message_container"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintWidth_percent="0.40">

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

            <ImageView
                android:id="@+id/dashboard_horizontal_group_item_attendance_icon"
                android:layout_width="28dp"
                android:layout_height="28dp"
                android:layout_marginStart="16dp"
                android:layout_marginTop="8dp"
                android:layout_marginBottom="8dp"
                android:src="@drawable/ic_main_attendance"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toStartOf="@id/dashboard_horizontal_group_item_attendance_value"
                app:layout_constraintHorizontal_chainStyle="packed"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_goneMarginEnd="16dp"
                app:tint="?colorOnSurface"
                tools:ignore="ContentDescription" />

            <ImageView
                android:id="@+id/dashboard_horizontal_group_item_attendance_error"
                android:layout_width="18dp"
                android:layout_height="18dp"
                android:layout_marginEnd="-4dp"
                android:layout_marginBottom="-4dp"
                android:background="@drawable/ic_circle"
                android:backgroundTint="?attr/colorSurface"
                android:contentDescription="@string/error_unknown"
                android:src="@drawable/ic_error_filled"
                app:layout_constraintBottom_toBottomOf="@id/dashboard_horizontal_group_item_attendance_icon"
                app:layout_constraintEnd_toEndOf="@id/dashboard_horizontal_group_item_attendance_icon"
                app:tint="?colorError"
                tools:visibility="visible" />

            <TextView
                android:id="@+id/dashboard_horizontal_group_item_attendance_value"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="6dp"
                android:layout_marginTop="8dp"
                android:layout_marginEnd="16dp"
                android:layout_marginBottom="8dp"
                android:includeFontPadding="false"
                android:textSize="20sp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toEndOf="@id/dashboard_horizontal_group_item_attendance_icon"
                app:layout_constraintTop_toTopOf="parent"
                tools:text="99,00%" />
        </androidx.constraintlayout.widget.ConstraintLayout>
    </com.google.android.material.card.MaterialCardView>

    <com.google.android.material.card.MaterialCardView
        android:id="@+id/dashboard_horizontal_group_item_info_container"
        android:layout_width="match_parent"
        android:layout_height="44dp"
        android:layout_marginVertical="4dp"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/dashboard_horizontal_group_item_message_container"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintWidth_percent="0.40">

        <TextView
            android:id="@+id/dashboard_horizontal_group_item_info_error_text"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginStart="16dp"
            android:layout_marginTop="8dp"
            android:layout_marginEnd="16dp"
            android:layout_marginBottom="8dp"
            android:drawablePadding="8dp"
            android:gravity="center_vertical"
            android:text="@string/dashboard_horizontal_group_error"
            android:textColor="?colorError"
            android:textSize="14sp"
            app:drawableStartCompat="@drawable/ic_error"
            app:drawableTint="?colorError"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/dashboard_lessons_item_title"
            tools:visibility="gone" />

        <com.google.android.material.progressindicator.CircularProgressIndicator
            android:id="@+id/dashboard_horizontal_group_item_info_progress"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_marginTop="8dp"
            android:layout_marginBottom="8dp"
            android:indeterminate="true"
            app:indicatorSize="28dp" />
    </com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.widget.ConstraintLayout>
