<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Nextcloud - Android Client
  ~
  ~ SPDX-FileCopyrightText: 2022 Álvaro Brey <alvaro@alvarobrey.com>
  ~ SPDX-FileCopyrightText: 2022 Nextcloud GmbH
  ~ SPDX-License-Identifier: AGPL-3.0-or-later
-->
<FrameLayout
    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"
    style="@style/Widget.Material3.BottomSheet"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom"
    app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">

    <LinearLayout
        android:id="@+id/bottom_sheet"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <com.google.android.material.bottomsheet.BottomSheetDragHandleView
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

        <com.google.android.material.progressindicator.CircularProgressIndicator
            android:id="@+id/bottom_sheet_loading"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_marginBottom="@dimen/standard_margin"
            android:indeterminate="true"
            tools:visibility="gone" />

        <LinearLayout
            android:id="@+id/bottom_sheet_header"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="@dimen/standard_margin"
            android:gravity="center"
            android:orientation="horizontal"
            android:visibility="visible">

            <include
                android:id="@+id/thumbnail_layout"
                layout="@layout/file_thumbnail"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="12dp" />

            <TextView
                android:id="@+id/title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="24dp"
                android:ellipsize="middle"
                android:lines="1"
                android:textAppearance="@style/TextAppearance.Material3.HeadlineSmall"
                tools:text="Test file name which is very very very very very long.pdf" />

        </LinearLayout>

        <androidx.core.widget.NestedScrollView
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <LinearLayout
                android:id="@+id/file_actions_list"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical" />

        </androidx.core.widget.NestedScrollView>

    </LinearLayout>

</FrameLayout>
