<?xml version="1.0" encoding="utf-8"?><!--
    Copyright 2023 Thomas Schneider

    This file is a part of Fedilab

    This program is free software; you can redistribute it and/or modify it under the terms of the
    GNU General Public License as published by the Free Software Foundation; either version 3 of the
    License, or (at your option) any later version.

    Fedilab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
    Public License for more details.

    You should have received a copy of the GNU General Public License along with Fedilab; if not,
    see <http://www.gnu.org/licenses>.
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:TagsEditText="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_margin="@dimen/fab_margin">

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

        <!-- Video title -->
        <com.google.android.material.textfield.TextInputLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <com.google.android.material.textfield.TextInputEditText
                android:id="@+id/p_video_title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/title"
                android:importantForAutofill="no"
                android:inputType="text"
                android:paddingTop="2dp"
                android:singleLine="true" />
        </com.google.android.material.textfield.TextInputLayout>


        <!-- Video media -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:labelFor="@+id/p_video_preview"
                android:text="@string/preview" />

            <ImageView
                android:id="@+id/p_video_preview"
                android:layout_width="match_parent"
                android:layout_height="200dp"
                android:contentDescription="@string/preview"
                android:scaleType="centerCrop" />

            <Button
                android:id="@+id/set_preview"
                style="@style/Widget.AppCompat.Button.Borderless.Colored"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:layout_margin="10dp"
                android:gravity="center"
                android:text="@string/change_preview" />
        </LinearLayout>

        <!-- Video tags -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:labelFor="@+id/p_video_tags"
                android:text="@string/tags" />

            <mabbas007.tagsedittext.TagsEditText
                android:id="@+id/p_video_tags"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:inputType="textMultiLine"
                android:lines="2"
                android:minLines="2"
                TagsEditText:allowSpaceInTag="true"
                TagsEditText:tagsBackground="?colorAccent"
                TagsEditText:tagsCloseImagePadding="@dimen/defaultTagsCloseImagePadding"
                TagsEditText:tagsCloseImageRight="@drawable/tag_close"
                TagsEditText:tagsTextColor="@color/white"
                TagsEditText:tagsTextSize="@dimen/defaultTagsTextSize" />
        </LinearLayout>


        <!-- video description -->
        <!-- Video title -->
        <com.google.android.material.textfield.TextInputLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <com.google.android.material.textfield.TextInputEditText
                android:id="@+id/p_video_description"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="top"
                android:hint="@string/description"
                android:importantForAutofill="no"
                android:inputType="textMultiLine"
                android:lines="5"
                android:maxLines="5"
                android:paddingTop="2dp"
                android:singleLine="false" />
        </com.google.android.material.textfield.TextInputLayout>

        <!-- Videos channels -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:layout_marginTop="20dp"
            android:gravity="center_vertical"
            android:orientation="vertical">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:text="@string/channel" />

            <Spinner
                android:id="@+id/set_upload_channel"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />
        </LinearLayout>


        <!-- Videos categories -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:layout_marginTop="10dp"
            android:gravity="center_vertical"
            android:orientation="vertical">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:text="@string/category" />

            <Spinner
                android:id="@+id/set_upload_categories"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />
        </LinearLayout>


        <!-- Videos licences -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:layout_marginTop="10dp"
            android:gravity="center_vertical"
            android:orientation="vertical">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:text="@string/license" />

            <Spinner
                android:id="@+id/set_upload_licenses"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />
        </LinearLayout>


        <!-- Videos languages -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:layout_marginTop="10dp"
            android:gravity="center_vertical"
            android:orientation="vertical">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:text="@string/language" />

            <Spinner
                android:id="@+id/set_upload_languages"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />
        </LinearLayout>

        <!-- Videos Privacy -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:layout_marginTop="10dp"
            android:gravity="center_vertical"
            android:orientation="vertical">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:text="@string/action_privacy" />

            <Spinner
                android:id="@+id/set_upload_privacy"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />
        </LinearLayout>


        <!-- More options -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:layout_marginTop="20dp"
            android:gravity="center_vertical"
            android:orientation="vertical">

            <CheckBox
                android:id="@+id/set_upload_nsfw"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/peertube_nsfw" />

            <CheckBox
                android:id="@+id/set_upload_enable_comments"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/peertube_enable_comments" />
        </LinearLayout>


        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_marginTop="40dp"
            android:orientation="horizontal">

            <!-- Videos upload edit submit -->
            <Button
                android:id="@+id/set_upload_delete"
                style="@style/Base.Widget.AppCompat.Button.Colored"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"

                android:layout_margin="10dp"
                android:gravity="center"
                android:text="@string/delete_video" />

            <!-- Videos upload edit submit -->
            <Button
                android:id="@+id/set_upload_submit"
                style="@style/Base.Widget.AppCompat.Button.Colored"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:layout_margin="10dp"
                android:enabled="false"
                android:gravity="center"
                android:text="@string/update_video" />
        </LinearLayout>

    </LinearLayout>
</ScrollView>

