<div class="modal fade" id="addModal" tabindex="-1" aria-labelledby="addModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="addModalLabel">เพิ่มข้อมูลคำถาม</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                <form id="addForm" method="POST">
                    @csrf
                    <div class="input-group">
                        <span class="input-group-btn">
                            <a id="lfm" data-input="videoInput" data-preview="videoPreview" class="btn btn-primary">
                                <i class="fa fa-video-camera"></i> เลือก
                            </a>
                        </span>
                        <input id="videoInput" class="form-control" type="text" name="video_url">
                    </div>
                    <br>
                    <video id="videoPreview" width="100%" controls>
                        <source src="" type="video/mp4">
                    </video>
                    <div class="mt-3">
                        <label class="form-label">คำถาม</label>
                        <input type="text" class="form-control" name="question_text" placeholder="คำถาม" value="{{ old('question_text') }}">
                    </div>
                    <div class="mt-3">
                        <label class="form-label">เวลาจำกัด</label>
                        <input type="number" class="form-control" name="time_limit" min="10" step="10" value="{{ old('time_limit') }}">
                    </div>
                    <div class="mt-3">
                        <div class="d-grid gap-2 d-md-flex justify-content-md-end">
                            <button class="btn btn-primary" id="addSubmitBtn" type="submit">บันทึก</button>
                            <button class="btn btn-secondary" type="button" data-bs-dismiss="modal">ยกเลิก</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>