<div data-te-modal-init class="fixed left-0 top-0 z-[1055] hidden h-full w-full overflow-y-auto overflow-x-hidden outline-none" id="modalAddSubtitles" tabindex="-1" aria-labelledby="Upload" aria-modal="true" role="dialog">
    <div data-te-modal-dialog-ref class="pointer-events-none relative flex min-h-[calc(100%-1rem)] w-auto translate-y-[-50px] items-center opacity-0 transition-all duration-300 ease-in-out min-[576px]:mx-auto min-[576px]:mt-7 min-[576px]:min-h-[calc(100%-3.5rem)] min-[576px]:max-w-[95%] md:min-[576px]:max-w-[90%] lg:min-[576px]:max-w-[60%] xl:min-[576px]:max-w-[50%]  2xl:min-[576px]:max-w-[40%]">
        <div class="pointer-events-auto relative flex w-full flex-col rounded-md border-none bg-white bg-clip-padding text-current shadow-lg outline-none dark:bg-neutral-800">
            <x-modal-header :title="__('Add Subtitles')"/>

            <!--Modal body-->
            <div class="relative p-4 pt-0">
                <form method="POST" action="{{ route('admin.update.subtitles') }}">
                    @csrf
                    <div class="p-2 pt-0">
                        <label class="leading-tight text-gray-800 dark:text-gray-200 w-full" for="subtitles">Subtitles:</label>
                        <x-text-input id="subtitles" class="block w-full" type="text" name="subtitles" />
                    </div>

                    <input name="episode_id" id="episode_id" type="hidden" value="{{ $episode->id }}" />

                    <div class="flex flex-shrink-0 flex-wrap items-center justify-end rounded-b-md p-4">
                        <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">
                            Edit
                        </button>
                    </div>
                </form>

                <form method="POST" action="{{ route('admin.add.new.subtitle') }}">
                    @csrf
                    <div class="grid grid-cols-2">
                        <div class="p-2 pt-0">
                            <label class="leading-tight text-gray-800 dark:text-gray-200 w-full" for="subtitles">Name:</label>
                            <x-text-input id="name" class="block w-full" type="text" name="name" required />
                        </div>
                        <div class="p-2 pt-0">
                            <label class="leading-tight text-gray-800 dark:text-gray-200 w-full" for="subtitles">Slug:</label>
                            <x-text-input id="slug" class="block w-full" type="text" name="slug" required />
                        </div>
                    </div>

                    <input name="episode_id" id="episode_id" type="hidden" value="{{ $episode->id }}" />

                    <div class="flex flex-shrink-0 flex-wrap items-center justify-end rounded-b-md p-4">
                        <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">
                            Add
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <!-- Modals JS -->
    @vite(['resources/js/admin-subtitles.js'])
</div>
