@extends('admin.layout')

@section('content')
<div class="relative pt-5 text-gray-900 dark:text-white xl:max-w-[95%] 2xl:max-w-[90%]">
    <div class="flex items-center justify-center">
        <div class="relative p-4 pt-0 bg-white dark:bg-neutral-800 rounded-lg border-t-2 border-b-2 border-pink-700">
            <form method="POST" action="{{ route('admin.upload') }}" enctype="multipart/form-data">
                @csrf

                <div class="grid grid-cols-3">
                    <div class="p-4">
                        <label class="leading-tight text-gray-800 dark:text-gray-200 w-full" for="title">Title:</label>
                        <x-text-input id="title" class="block w-full" type="text" name="title" required autofocus/>
                    </div>

                    <div class="p-4">
                        <label class="leading-tight text-gray-800 dark:text-gray-200 w-full" for="title_jpn">Title JPN:</label>
                        <x-text-input id="title_jpn" class="block w-full" type="text" name="title_jpn" required />
                    </div>

                    <div class="p-4">
                        <label class="leading-tight text-gray-800 dark:text-gray-200 w-full" for="studio">Studio:</label>
                        <x-text-input id="studio" class="block w-full" type="text" name="studio" required />
                    </div>
                </div>

                <div class="p-4 pt-0">
                    <label class="leading-tight text-gray-800 dark:text-gray-200 w-full" for="tags">Tags:</label>
                    <x-text-input id="tags" class="block w-full" type="text" name="tags" required />
                </div>

                <div class="grid grid-cols-2">
                    <div class="p-4 pt-0">
                        <label class="leading-tight text-gray-800 dark:text-gray-200 w-full" for="releasedate">Release Date:</label>
                        <input class="block w-full text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-rose-800 focus:border-rose-900 dark:bg-neutral-900 dark:border-neutral-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-rose-800 dark:focus:border-rose-900" type="date" name="releasedate" id="releasedate" required>
                    </div>

                    <div class="p-4 pt-0">
                        <label class="leading-tight text-gray-800 dark:text-gray-200 w-full" for="episodes">Episodes:</label>
                        <input class="block w-full text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-rose-800 focus:border-rose-900 dark:bg-neutral-900 dark:border-neutral-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-rose-800 dark:focus:border-rose-900" type="number" name="episodes" id="episodes" value="1" required>
                    </div>
                </div>

                <div class="p-4 pt-0">
                    <label class="leading-tight text-gray-800 dark:text-gray-200 w-full" for="baseurl">Stream:</label>
                    <x-text-input id="baseurl" class="block w-full" type="text" name="baseurl" required />
                </div>

                <!-- Episodes -->
                <div class="grid grid-cols-2">
                    <!-- Cover -->
                    <div class="p-4">
                        <label class="leading-tight text-gray-800 dark:text-gray-200 w-full" for="episodecover1">Cover 1:</label>
                        <input class="block w-full text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-rose-800 focus:border-rose-900 dark:bg-neutral-900 dark:border-neutral-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-rose-800 dark:focus:border-rose-900" type="file" name="episodecover1" id="episodecover1" required>
                    </div>
                    <!-- Thumbs -->
                    <div class="p-4">
                        <label class="leading-tight text-gray-800 dark:text-gray-200 w-full" for="episodegallery1">Gallery 1:</label>
                        <input class="block w-full text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-rose-800 focus:border-rose-900 dark:bg-neutral-900 dark:border-neutral-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-rose-800 dark:focus:border-rose-900" type="file" name="episodegallery1[]" id="episodegallery1" multiple="">
                    </div>
                </div>

                <div class="p-4 pt-0">
                    <label class="leading-tight text-gray-800 dark:text-gray-200 w-full" for="description1">Description 1:</label>
                    <textarea rows="4" cols="50" id="description1" name="description1" class="mt-1 block w-full border-gray-300 dark:border-gray-700 dark:bg-neutral-900 dark:text-gray-300 focus:border-rose-500 dark:focus:border-rose-600 focus:ring-rose-500 dark:focus:ring-rose-600 rounded-md shadow-sm" required>
                    </textarea>
                </div>

                <div class="p-4 pt-0">
                    <label class="leading-tight text-gray-800 dark:text-gray-200 w-full" for="episodedlurl1">Download 1080p 1:</label>
                    <x-text-input id="episodedlurl1" class="block w-full" type="text" name="episodedlurl1" required />
                </div>

                <div class="p-4 pt-0">
                    <label class="leading-tight text-gray-800 dark:text-gray-200 w-full" for="episodedlurlinterpolated1">Download 1080p48fps 1:</label>
                    <x-text-input id="episodedlurlinterpolated1" class="block w-full" type="text" name="episodedlurlinterpolated1" />
                </div>

                <div class="p-4 pt-0">
                    <label class="leading-tight text-gray-800 dark:text-gray-200 w-full" for="episodedlurl4k1">Download 4k 1:</label>
                    <x-text-input id="episodedlurl4k1" class="block w-full" type="text" name="episodedlurl4k1" required />
                </div>

                <div class="p-4 pt-0">
                    <label class="leading-tight text-gray-800 dark:text-gray-200 w-full" for="downloadUHDi1">Download 4k 48fps 1:</label>
                    <x-text-input id="downloadUHDi1" class="block w-full" type="text" name="downloadUHDi1" />
                </div>

                <div id="moreEpisodes">
                </div>

                <div class="flex flex-shrink-0 flex-wrap items-center justify-end rounded-b-md p-4">
                    <button type="button" class="inline-block rounded bg-primary-100 px-6 pb-2 pt-2.5 text-xs font-medium uppercase leading-normal text-primary-700 transition duration-150 ease-in-out hover:bg-primary-accent-100 focus:bg-primary-accent-100 focus:outline-none focus:ring-0 active:bg-primary-accent-200" data-te-modal-dismiss data-te-ripple-init data-te-ripple-color="light">
                        Cancel
                    </button>
                    <button type="submit" class="ml-1 inline-block rounded bg-rose-600 px-6 pb-2 pt-2.5 text-xs font-medium uppercase leading-normal text-white transition duration-150 ease-in-out hover:bg-rose-700 focus:bg-rose-600" data-te-ripple-init data-te-ripple-color="light">
                        Create
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
@vite(['resources/js/upload.js'])
@endsection