{{-- Video source help modal: include in add/edit movie file and episode modals --}}
<div class="modal fade" id="videoSourceHelpModal" tabindex="-1" aria-labelledby="videoSourceHelpModalLabel" aria-hidden="true" data-bs-backdrop="true" data-bs-keyboard="true">
    <div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="videoSourceHelpModalLabel">{{ __('video_source_help_title') }}</h5>
                <button type="button" class="close ms-auto" data-bs-dismiss="modal" aria-label="Close"><i class="las la-times"></i></button>
            </div>
            <div class="modal-body small">
                <p class="text-muted mb-3">{{ __('video_source_help_intro') }}</p>
                <ul class="list-unstyled mb-0">
                    <li class="mb-2"><strong>{{ __('local_video') }}</strong> — {{ __('video_source_help_local') }}</li>
                    <li class="mb-2"><strong>{{ __('google_drive') }}</strong> — {{ __('video_source_help_gdrive') }}</li>
                    <li class="mb-2"><strong>{{ __('youtube') }}</strong> — {{ __('video_source_help_youtube') }}</li>
                    <li class="mb-2"><strong>{{ __('mp4_from_url') }} / MKV / WebM</strong> — {{ __('video_source_help_mp4') }}</li>
                    <li class="mb-2"><strong>{{ __('m3u8_from_url') }}</strong> — {{ __('video_source_help_m3u8') }}</li>
                    <li class="mb-2"><strong>{{ __('embed_url') }}</strong> — {{ __('video_source_help_embed') }}</li>
                    <li class="mb-0"><strong>S3 / {{ __('wasabi_S3') }} / {{ __('digital_ocean') }}</strong> — {{ __('video_source_help_cloud') }}</li>
                </ul>
            </div>
        </div>
    </div>
</div>
<script>
(function() {
    $(document).off('click.videoSourceHelp').on('click.videoSourceHelp', '.video-source-help-btn', function(e) {
        e.preventDefault();
        var modal = document.getElementById('videoSourceHelpModal');
        if (modal && window.bootstrap && bootstrap.Modal) {
            new bootstrap.Modal(modal).show();
        } else if ($.fn.modal) {
            $('#videoSourceHelpModal').modal('show');
        }
    });
})();
</script>
