<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Nextcloud - Android Client
  ~
  ~ SPDX-FileCopyrightText: 2023 ZetaTom
  ~ SPDX-FileCopyrightText: 2023 Nextcloud GmbH
  ~ SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
-->
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:padding="16dp">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:paddingHorizontal="16dp">

            <LinearLayout
                android:id="@+id/fileInformation"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center_vertical"
                android:orientation="horizontal"
                android:paddingBottom="16dp"
                android:visibility="gone"
                tools:visibility="visible">

                <ImageView
                    android:id="@+id/file_details_icon"
                    android:layout_width="48dp"
                    android:layout_height="48dp"
                    android:contentDescription="@string/image_preview_filedetails"
                    android:padding="6dp"

                    android:src="@drawable/outline_image_24" />

                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:paddingHorizontal="12dp">

                    <TextView
                        android:id="@+id/fileInformation_time"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:padding="2dp"
                        android:textStyle="bold"
                        tools:text="Wednesday • 26 Jul 2023 • 12:27" />

                    <TextView
                        android:id="@+id/fileInformation_details"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:padding="2dp"
                        tools:text="12 MP • 3024 × 4032 • 923 KB" />
                </LinearLayout>
            </LinearLayout>

            <LinearLayout
                android:id="@+id/imgTC"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center_vertical"
                android:orientation="horizontal"
                android:paddingBottom="16dp"
                android:visibility="gone"
                tools:visibility="visible">

                <ImageView
                    android:id="@+id/camera_information_icon"
                    android:layout_width="48dp"
                    android:layout_height="48dp"
                    android:contentDescription="@string/image_preview_image_taking_conditions"
                    android:padding="6dp"
                    android:src="@drawable/outline_camera_24" />

                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:paddingHorizontal="12dp">

                    <TextView
                        android:id="@+id/imgTC_makeModel"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:padding="2dp"
                        android:textStyle="bold"
                        tools:text="Camera Phone (4th generation)" />

                    <TextView
                        android:id="@+id/imgTC_conditions"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:padding="2dp"
                        tools:text="ƒ/1.8 • 1/374 s • 28 mm • ISO 200" />
                </LinearLayout>
            </LinearLayout>

        </LinearLayout>

        <com.google.android.material.card.MaterialCardView
            android:id="@+id/imageLocation"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:visibility="gone"
            tools:visibility="visible">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="330dp"
                android:background="@drawable/rounded_rect"
                android:elevation="1dp"
                android:orientation="vertical">

                <TextView
                    android:id="@+id/imageLocation_text"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:ellipsize="end"
                    android:maxLines="2"
                    android:paddingHorizontal="12dp"
                    android:paddingVertical="6dp"
                    android:textAlignment="center"
                    android:textStyle="bold"
                    android:visibility="gone"
                    tools:text="Mitte, Berlin, Germany"
                    tools:visibility="visible" />

                <FrameLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent">

                    <org.osmdroid.views.MapView
                        android:id="@+id/imageLocation_map"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent" />

                    <TextView
                        android:id="@+id/imageLocation_map_copyright"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="bottom|end"
                        android:padding="5dp"
                        tools:text="© OpenStreetMap contributors" />
                </FrameLayout>

            </LinearLayout>

        </com.google.android.material.card.MaterialCardView>

    </LinearLayout>
</androidx.core.widget.NestedScrollView>
