<x-app-layout>
    @section('page-title', $pageTitle)
    <div class="d-flex align-items-center mb-4">
        <a href="{{ route('admin.rekomendasi.index') }}" class="btn btn-outline-secondary me-3">
            <i class="bi bi-arrow-left"></i>
        </a>
        <h3 class="my-0 fw-bold">Formulir Tambah Rekomendasi</h3>
    </div>

    <div class="row justify-content-center">
        <div class="col-md-10">
            <div class="card border-0 shadow-sm">
                <div class="card-body p-4">
                    <div class="card-body">
                        <form action="{{ route('admin.rekomendasi.store') }}" method="POST">
                            @csrf
                            <div class="mb-3"><label class="form-label">Judul</label><input type="text"
                                    name="judul" class="form-control" required></div>
                            <div class="mb-3"><label class="form-label">Kategori</label><input type="text"
                                    name="kategori" class="form-control" placeholder="Contoh: Teknologi, Sains, Biologi" required></div>
                            <div class="mb-3"><label class="form-label">Link YouTube</label><input type="url"
                                    name="youtube_link" class="form-control" placeholder="https://www.youtube.com/watch?v=xxxxxx" required></div>
                            <div class="mb-3"><label class="form-label">Deskripsi</label>
                                <textarea name="deskripsi" id="editor" required></textarea>
                            </div>
                            <hr>
                            <div class="d-flex justify-content-end"><button type="submit"
                                    class="btn btn-primary">Simpan</button></div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    @push('scripts')
        <script src="https://cdn.ckeditor.com/4.22.1/standard/ckeditor.js"></script>
        <script>
            CKEDITOR.replace('editor');
        </script>
    @endpush
</x-app-layout>
