<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView 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:id="@+id/card"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginHorizontal="@dimen/spacer_2x"
    android:layout_marginVertical="@dimen/spacer_1x">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:paddingBottom="@dimen/spacer_1x">

        <LinearLayout
            android:id="@+id/coverImages"
            android:layout_width="match_parent"
            android:layout_height="130dp"
            android:layout_rowWeight="1"
            android:layout_columnWeight="1"
            android:layout_marginBottom="@dimen/spacer_1x"
            android:orientation="horizontal"
            android:visibility="gone"
            tools:background="@tools:sample/backgrounds/scenic"
            tools:visibility="visible" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:paddingHorizontal="@dimen/spacer_2x"
            android:paddingTop="@dimen/spacer_1x">

            <com.google.android.material.textview.MaterialTextView
                android:id="@+id/card_title"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:paddingVertical="2sp"
                android:textColor="?attr/colorOnSurface"
                android:textSize="18sp"
                tools:ignore="RtlSymmetry"
                tools:text="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut l" />

            <ImageView
                android:id="@+id/not_synced_yet"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="8sp"
                android:contentDescription="@string/not_synced_yet"
                android:visibility="gone"
                app:srcCompat="@drawable/ic_sync_18dp"
                app:tint="?attr/colorPrimary"
                tools:visibility="visible" />

            <it.niedermann.nextcloud.deck.ui.view.DueDateChip
                android:id="@+id/card_due_date"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                tools:chipIcon="@drawable/ic_time_24"
                tools:text="tomorrow" />
        </LinearLayout>

        <it.niedermann.nextcloud.deck.ui.view.labellayout.DefaultLabelLayout
            android:id="@+id/labels"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/spacer_1x"
            android:animateLayoutChanges="true"
            android:paddingHorizontal="@dimen/spacer_2x"
            app:flexWrap="nowrap"
            tools:layout_height="@dimen/avatar_size" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/spacer_1x"
            android:baselineAligned="false"
            android:paddingHorizontal="@dimen/spacer_1x">

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1">

                <com.google.android.material.textview.MaterialTextView
                    android:id="@+id/card_count_comments"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:drawablePadding="@dimen/spacer_1hx"
                    android:gravity="center_vertical"
                    android:padding="@dimen/spacer_1hx"
                    app:drawableStartCompat="@drawable/ic_comment_24dp"
                    tools:text="2" />

                <com.google.android.material.textview.MaterialTextView
                    android:id="@+id/card_count_tasks"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:drawablePadding="@dimen/spacer_1qx"
                    android:gravity="center_vertical"
                    android:padding="@dimen/spacer_1hx"
                    tools:drawableStartCompat="@drawable/ic_check_box_24"
                    tools:text="1/2" />

                <com.google.android.material.textview.MaterialTextView
                    android:id="@+id/card_count_attachments"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:gravity="center_vertical"
                    android:padding="@dimen/spacer_1hx"
                    app:drawableStartCompat="@drawable/ic_attach_file_24dp"
                    tools:text="3" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content">

                <it.niedermann.nextcloud.deck.ui.view.OverlappingAvatars
                    android:id="@+id/overlappingAvatars"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginHorizontal="@dimen/spacer_1x"
                    android:gravity="end"
                    android:orientation="horizontal"
                    tools:background="@tools:sample/avatars"
                    tools:layout_height="@dimen/avatar_size_small"
                    tools:layout_width="@dimen/avatar_size_small" />

                <ImageView
                    android:id="@+id/card_menu"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:background="?attr/selectableItemBackgroundBorderless"
                    android:contentDescription="@string/label_menu"
                    android:padding="@dimen/spacer_1hx"
                    app:srcCompat="@drawable/ic_menu"
                    app:tint="?attr/colorOnSurface" />
            </LinearLayout>
        </LinearLayout>
    </LinearLayout>
</com.google.android.material.card.MaterialCardView>