<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Nextcloud - Android Client
  ~
  ~ SPDX-FileCopyrightText: 2023 Alper Ozturk <alper_ozturk@proton.me>
  ~ SPDX-FileCopyrightText: 2023 Andy Scherzinger <info@andy-scherzinger.de>
  ~ SPDX-FileCopyrightText: 2023 Tobias Kaminsky <tobias@kaminsky.me>
  ~ SPDX-FileCopyrightText: 2020 Abdourahamane Boinaidi <abdourahamane.boinaidi@infomaniak.com>
  ~ SPDX-FileCopyrightText: 2015 ownCloud Inc.
  ~ SPDX-FileCopyrightText: 2012 Bartosz Przybylski <bart.p.pl@gmail.com>
  ~ SPDX-License-Identifier: GPL-2.0-only AND AGPL-3.0-or-later
-->
<LinearLayout 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/ListItemLayout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:baselineAligned="false"
    android:descendantFocusability="blocksDescendants"
    android:minHeight="@dimen/standard_list_item_size"
    android:orientation="horizontal"
    android:paddingTop="@dimen/standard_half_padding"
    android:paddingBottom="@dimen/standard_half_padding">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="@dimen/min_list_item_size"
        android:layout_height="@dimen/min_list_item_size"
        android:layout_marginStart="@dimen/zero"
        android:layout_marginEnd="@dimen/standard_quarter_padding">

        <FrameLayout
            android:id="@+id/thumbnail_container"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent">

            <include
                android:id="@+id/thumbnail_layout"
                layout="@layout/file_thumbnail" />
        </FrameLayout>

        <ImageView
            android:id="@+id/localFileIndicator"
            android:layout_width="@dimen/list_item_local_file_indicator_layout_width"
            android:layout_height="@dimen/list_item_local_file_indicator_layout_height"
            android:contentDescription="@string/downloader_download_succeeded_ticker"
            android:scaleType="fitCenter"
            android:src="@drawable/ic_synced"
            app:layout_constraintBottom_toBottomOf="@+id/thumbnail_container"
            app:layout_constraintEnd_toEndOf="@+id/thumbnail_container"
            app:layout_constraintStart_toEndOf="@+id/thumbnail_container"
            app:layout_constraintTop_toBottomOf="@+id/thumbnail_container" />

        <ImageView
            android:id="@+id/favorite_action"
            android:layout_width="@dimen/list_item_favorite_action_layout_width"
            android:layout_height="@dimen/list_item_favorite_action_layout_height"
            android:contentDescription="@string/favorite"
            android:src="@drawable/favorite"
            app:layout_constraintBottom_toTopOf="@+id/thumbnail_container"
            app:layout_constraintEnd_toEndOf="@+id/thumbnail_container"
            app:layout_constraintStart_toEndOf="@+id/thumbnail_container"
            app:layout_constraintTop_toTopOf="@+id/thumbnail_container" />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:gravity="top"
        android:minHeight="@dimen/min_list_item_size"
        android:orientation="vertical"
        android:paddingTop="@dimen/standard_half_padding">

        <TextView
            android:id="@+id/Filename"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:ellipsize="middle"
            android:singleLine="true"
            android:textColor="@color/text_color"
            android:textSize="@dimen/two_line_primary_text_size"
            tools:text="@string/placeholder_filename" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">

            <com.google.android.material.chip.ChipGroup
                android:id="@+id/tagsGroup"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:clickable="false"
                android:paddingTop="@dimen/standard_quarter_padding"
                android:visibility="gone"
                app:chipSpacingVertical="@dimen/standard_quarter_padding">

                <com.google.android.material.chip.Chip
                    android:id="@+id/firstTag"
                    android:layout_width="wrap_content"
                    android:layout_height="@dimen/tag_height"
                    android:checkable="false"
                    android:clickable="false"
                    android:ellipsize="middle"
                    android:textColor="@color/list_item_lastmod_and_filesize_text"
                    android:textSize="@dimen/two_line_secondary_text_size"
                    app:chipBackgroundColor="@color/bg_default"
                    app:chipEndPadding="@dimen/zero"
                    app:chipStartPadding="@dimen/zero"
                    app:ensureMinTouchTargetSize="false"
                    tools:text="tag1" />

                <com.google.android.material.chip.Chip
                    android:id="@+id/secondTag"
                    android:layout_width="wrap_content"
                    android:layout_height="@dimen/tag_height"
                    android:checkable="false"
                    android:clickable="false"
                    android:ellipsize="middle"
                    android:textColor="@color/list_item_lastmod_and_filesize_text"
                    android:textSize="@dimen/two_line_secondary_text_size"
                    app:chipBackgroundColor="@color/bg_default"
                    app:chipEndPadding="@dimen/zero"
                    app:chipStartPadding="@dimen/zero"
                    app:ensureMinTouchTargetSize="false"
                    tools:text="tag2" />

                <com.google.android.material.chip.Chip
                    android:id="@+id/tag_more"
                    android:layout_width="wrap_content"
                    android:layout_height="@dimen/tag_height"
                    android:checkable="false"
                    android:clickable="false"
                    android:ellipsize="none"
                    android:textColor="@color/list_item_lastmod_and_filesize_text"
                    android:textSize="@dimen/two_line_secondary_text_size"
                    app:chipBackgroundColor="@color/bg_default"
                    app:chipEndPadding="@dimen/zero"
                    app:chipStartPadding="@dimen/zero"
                    app:ensureMinTouchTargetSize="false"
                    tools:text="+3" />

            </com.google.android.material.chip.ChipGroup>

            <LinearLayout
                android:id="@+id/file_detail_group"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="horizontal">

                <TextView
                    android:id="@+id/live_photo_indicator"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:drawablePadding="@dimen/standard_eight_padding"
                    android:gravity="center"
                    android:text="@string/file_list_live"
                    android:textColor="@color/list_item_lastmod_and_filesize_text"
                    android:textSize="@dimen/two_line_secondary_text_size"
                    android:visibility="gone"
                    app:drawableLeftCompat="@drawable/ic_live_photo"
                    app:drawableTint="@color/list_item_lastmod_and_filesize_text"
                    tools:visibility="visible" />

                <TextView
                    android:id="@+id/live_photo_indicator_separator"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:gravity="end"
                    android:paddingStart="@dimen/zero"
                    android:paddingEnd="@dimen/standard_quarter_padding"
                    android:text="@string/info_separator"
                    android:textColor="@color/list_item_lastmod_and_filesize_text"
                    android:textSize="@dimen/two_line_secondary_text_size"
                    android:visibility="gone"
                    tools:visibility="visible" />

                <TextView
                    android:id="@+id/file_size"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/placeholder_fileSize"
                    android:textColor="@color/list_item_lastmod_and_filesize_text"
                    android:textSize="@dimen/two_line_secondary_text_size" />

                <TextView
                    android:id="@+id/file_separator"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:gravity="end"
                    android:paddingStart="@dimen/zero"
                    android:paddingEnd="@dimen/standard_quarter_padding"
                    android:text="@string/info_separator"
                    android:textColor="@color/list_item_lastmod_and_filesize_text"
                    android:textSize="@dimen/two_line_secondary_text_size" />

                <TextView
                    android:id="@+id/last_mod"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:gravity="end"
                    android:text="@string/placeholder_media_time"
                    android:textColor="@color/list_item_lastmod_and_filesize_text"
                    android:textSize="@dimen/two_line_secondary_text_size" />
            </LinearLayout>

        </LinearLayout>

    </LinearLayout>

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="center_vertical|end"
        android:orientation="horizontal"
        android:paddingStart="@dimen/standard_half_padding"
        android:paddingEnd="@dimen/zero">

        <ImageView
            android:id="@+id/unreadComments"
            android:layout_width="48dp"
            android:layout_height="match_parent"
            android:clickable="true"
            android:contentDescription="@string/unread_comments"
            android:focusable="true"
            android:paddingStart="@dimen/standard_half_padding"
            android:paddingEnd="@dimen/list_item_share_right_margin"
            android:src="@drawable/ic_comment"
            android:visibility="gone"
            tools:visibility="visible" />

        <ImageView
            android:id="@+id/sharedIcon"
            android:layout_width="48dp"
            android:layout_height="wrap_content"
            android:layout_gravity="top"
            android:clickable="true"
            android:contentDescription="@string/shared_icon_share"
            android:focusable="true"
            android:minHeight="@dimen/min_list_item_size"
            android:paddingStart="@dimen/list_item_share_right_margin"
            android:paddingEnd="@dimen/list_item_share_right_margin"
            android:src="@drawable/ic_unshared"
            tools:visibility="visible" />

        <com.owncloud.android.ui.AvatarGroupLayout
            android:id="@+id/sharedAvatars"
            android:layout_width="75dp"
            android:layout_height="@dimen/min_list_item_size"
            android:layout_gravity="top"
            android:contentDescription="@string/shared_avatar_desc"
            android:gravity="center_vertical"
            android:visibility="visible" />

        <ImageView
            android:id="@+id/custom_checkbox"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="top"
            android:clickable="false"
            android:contentDescription="@string/checkbox"
            android:focusable="false"
            android:minHeight="@dimen/min_list_item_size"
            android:paddingStart="@dimen/standard_half_padding"
            android:paddingEnd="@dimen/alternate_padding"
            android:src="@drawable/ic_checkbox_blank_outline" />

        <ImageView
            android:id="@+id/overflow_menu"
            android:layout_width="48dp"
            android:layout_height="wrap_content"
            android:layout_gravity="top"
            android:clickable="true"
            android:contentDescription="@string/overflow_menu"
            android:focusable="true"
            android:minHeight="@dimen/min_list_item_size"
            android:paddingStart="12dp"
            android:paddingEnd="12dp"
            android:src="@drawable/ic_dots_vertical" />

    </LinearLayout>
</LinearLayout>
