<?php $__env->startSection('content'); ?>

<style>
    /* STYLE UNTUK MEMPERCANTIK TAMPILAN DARK/LIGHT */
    [data-theme="dark"] .modal-content,
    [data-theme="dark"] .card {
        background-color: var(--bg-card);
        border: 1px solid var(--border-color);
        color: var(--text-main);
    }
    [data-theme="dark"] .form-control,
    [data-theme="dark"] .form-select {
        background-color: var(--hover-bg);
        border-color: var(--border-color);
        color: var(--text-main);
    }
    [data-theme="dark"] .text-muted { color: #cbd5e1 !important; }
    [data-theme="dark"] h2, [data-theme="dark"] h5, [data-theme="dark"] label { color: #f1f5f9; }
    [data-theme="dark"] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
    
    /* Agar Textarea lebih rapat secara visual */
    textarea.form-control {
        line-height: 1.3;
    }

    /* Custom Table Header untuk Penilaian */
    .table-header-soft {
        background-color: #f8f9fa;
        color: #6c757d;
        font-size: 0.85rem;
        text-transform: uppercase;
        font-weight: 600;
        letter-spacing: 0.5px;
    }

    /* --- Styling Accordion & Dark Mode Support --- */
    .accordion-penilaian .accordion-item {
        border: 1px solid var(--border-color, #dee2e6);
        border-radius: 8px !important;
        margin-bottom: 15px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.02);
        overflow: hidden;
        background-color: transparent;
    }
    .accordion-penilaian .accordion-button {
        font-size: 1.05rem;
        padding: 1rem 1.25rem;
    }
    .accordion-penilaian .accordion-button:not(.collapsed) {
        background-color: #f8f9fa;
        color: #0d6efd;
        box-shadow: inset 0 -1px 0 rgba(0,0,0,.125);
    }
    .accordion-penilaian .accordion-body {
        background-color: #ffffff; 
    }
    
    /* Dark Mode Accordion */
    [data-theme="dark"] .accordion-penilaian .accordion-item { background-color: var(--bg-card); border-color: var(--border-color); }
    [data-theme="dark"] .accordion-penilaian .accordion-button { background-color: var(--bg-card); color: var(--text-main); }
    [data-theme="dark"] .accordion-penilaian .accordion-button:not(.collapsed) { background-color: var(--hover-bg); color: #6ea8fe; border-bottom: 1px solid var(--border-color); }
    [data-theme="dark"] .accordion-penilaian .accordion-button::after { filter: invert(1); }
    [data-theme="dark"] .accordion-penilaian .accordion-body { background-color: var(--bg-card); }
    [data-theme="dark"] .table-header-soft { background-color: var(--hover-bg); color: var(--text-main); border-color: var(--border-color) !important; }
</style>

<div class="container py-4">
    
    <div class="d-flex justify-content-between align-items-center mb-4">
        <div>
            <h2 class="fw-bold" style="color: #1e293b;">Manajemen Penilaian</h2>
            <p class="text-muted mb-0">Kelola nilai siswa, dikelompokkan per kelas dan mapel.</p>
        </div>
        <div>
            <button type="button" class="btn btn-secondary me-2 shadow-sm" id="btnCetak" onclick="submitCetak()" disabled>
                <i class="bi bi-printer me-1"></i> Cetak Terpilih
            </button>
            <button type="button" class="btn btn-primary shadow-sm" onclick="openModalCreate()">
                <i class="bi bi-plus-circle me-1"></i> Buat Penilaian
            </button>
        </div>
    </div>

    
    <div class="card border-0 shadow-sm mb-4">
        <div class="card-body py-3 d-flex align-items-center">
            <div class="form-check m-0">
                <input class="form-check-input" type="checkbox" id="checkAllGlobal" style="transform: scale(1.2);">
                <label class="form-check-label fw-bold ms-2 text-primary" for="checkAllGlobal" style="cursor: pointer;">
                    Pilih Semua Data Penilaian
                </label>
            </div>
        </div>
    </div>

    
    <div class="accordion accordion-penilaian" id="accordionPenilaian">
        <?php $__empty_1 = true; $__currentLoopData = $penilaians; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $namaKelas => $mapelGroup): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
            <div class="accordion-item border-0 shadow-sm">
                <h2 class="accordion-header" id="heading-<?php echo e($loop->index); ?>">
                    <button class="accordion-button fw-bold collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapse-<?php echo e($loop->index); ?>" aria-expanded="false" aria-controls="collapse-<?php echo e($loop->index); ?>">
                        <i class="bi bi-door-open-fill me-2 text-primary"></i> 
                        Kelas <?php echo e($namaKelas); ?>

                    </button>
                </h2>
                <div id="collapse-<?php echo e($loop->index); ?>" class="accordion-collapse collapse" aria-labelledby="heading-<?php echo e($loop->index); ?>">
                    <div class="accordion-body p-0">
                        <?php $__currentLoopData = $mapelGroup; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $namaMapel => $jenisGroup): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <div class="p-4 border-bottom last-no-border">
                                
                                <h6 class="fw-bold text-dark mb-3 text-uppercase d-flex align-items-center" style="letter-spacing: 0.5px;">
                                    <i class="bi bi-journal-bookmark-fill me-2 text-warning"></i> <?php echo e($namaMapel); ?>

                                </h6>

                                <?php $__currentLoopData = $jenisGroup; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $jenisPenilaian => $dataItems): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    
                                    <div class="mb-4 ps-3 border-start border-3 border-info">
                                        <div class="d-flex align-items-center mb-2 justify-content-between">
                                            <div>
                                                <span class="badge bg-info bg-opacity-10 text-info border border-info rounded-pill px-3 py-1">
                                                    <?php echo e($jenisPenilaian); ?>

                                                </span>
                                                <small class="text-muted ms-2 fw-medium">(<?php echo e($dataItems->count()); ?> Data)</small>
                                            </div>
                                        </div>

                                        
                                        <div class="table-responsive rounded border mt-2">
                                            <table class="table table-hover align-middle mb-0">
                                                <thead class="table-header-soft">
                                                    <tr>
                                                        <th width="5%" class="text-center py-2">
                                                            <input type="checkbox" class="form-check-input checkAll-group" title="Pilih Semua di Grup Ini">
                                                        </th>
                                                        <th width="15%" class="py-2">Hari, Tanggal</th>
                                                        <th width="8%" class="py-2">Skala</th>
                                                        <th class="py-2">Topik / Judul</th>
                                                        <th width="15%" class="text-end pe-4 py-2">Aksi</th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    <?php $__currentLoopData = $dataItems; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $p): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <tr>
                                                        <td class="text-center">
                                                            <input type="checkbox" class="form-check-input check-item" value="<?php echo e($p->id); ?>">
                                                        </td>
                                                        <td class="fw-medium text-muted small">
                                                            <?php echo e(\Carbon\Carbon::parse($p->tanggal)->locale('id')->translatedFormat('l, d F Y')); ?>

                                                        </td>
                                                        <td>
                                                            <span class="badge bg-secondary-subtle text-secondary border border-secondary-subtle">
                                                                <?php echo e(ucfirst($p->skala_penilaian ?? 'angka')); ?>

                                                            </span>
                                                        </td>

                                                        <td class="fw-bold text-dark"><?php echo e($p->topik ?? '-'); ?>

                                                                <span class="badge bg-success-subtle text-success border border-success-subtle rounded-pill px-3">
                                                                <i class="bi bi-person-check-fill me-1"></i> Dinilai : 
                                                                <?php echo e($p->details_count); ?> orang
                                                            </span>                                                       
                                                        </td>
                                                        <td class="text-end pe-4">
                                                            <div class="btn-group">
                                                                <button class="btn btn-sm btn-outline-warning" onclick="editPenilaian(<?php echo e($p->id); ?>)" title="Edit">
                                                                    <i class="bi bi-pencil-square"></i>
                                                                </button>
                                                                <form action="<?php echo e(route('penilaian.destroy', $p->id)); ?>" method="POST" onsubmit="return confirm('Hapus penilaian ini?')" style="display:inline;">
                                                                    <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
                                                                    <button type="submit" class="btn btn-sm btn-outline-danger" title="Hapus">
                                                                        <i class="bi bi-trash"></i>
                                                                    </button>
                                                                </form>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </div>
                </div>
            </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
            
            <div class="card shadow-sm border-0">
                <div class="card-body text-center py-5">
                    <div class="text-muted opacity-50 mb-2">
                        <i class="bi bi-clipboard-data" style="font-size: 3rem;"></i>
                    </div>
                    <h5 class="text-muted fw-bold">Belum ada data penilaian.</h5>
                    <p class="text-muted mb-3">Silakan klik tombol di bawah untuk mulai merekap nilai.</p>
                    <button type="button" class="btn btn-primary" onclick="openModalCreate()">
                        <i class="bi bi-plus-circle me-1"></i> Buat Penilaian
                    </button>
                </div>
            </div>
        <?php endif; ?>
    </div>
</div>


<div class="modal fade" id="modalForm" tabindex="-1" aria-hidden="true">
    <div class="modal-dialog modal-lg modal-dialog-scrollable">
        <form action="<?php echo e(route('penilaian.store')); ?>" method="POST" id="formPenilaian">
            <?php echo csrf_field(); ?>
            <div id="methodPut"></div>

            <div class="modal-content border-0">
                <div class="modal-header bg-primary text-white">
                    <h5 class="modal-title fw-bold" id="modalTitle"><i class="bi bi-pencil-square"></i> Buat Penilaian Baru</h5>
                    <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <div class="modal-body">
                    <div class="row g-3">
                        
                        <div class="col-md-6">
                            <label class="form-label small text-muted text-uppercase fw-bold">Mata Pelajaran</label>
                            <select name="subject_id" id="inputMapel" class="form-select" required onchange="loadClasses()">
                                <option value="">-- Pilih Mapel --</option>
                                <?php $__currentLoopData = $subjects; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $s): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($s->id); ?>"><?php echo e($s->name); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>

                        <div class="col-md-6">
                            <label class="form-label small text-muted text-uppercase fw-bold">Kelas</label>
                            <select name="kelas_id" id="inputKelas" class="form-select" required>
                                <option value="">-- Pilih Mapel Dulu --</option>
                            </select>
                        </div>

                        <div class="col-md-6">
                            <label class="form-label small text-muted text-uppercase fw-bold">Tanggal</label>
                            <input type="date" name="tanggal" id="inputTanggal" class="form-control" value="<?php echo e(date('Y-m-d')); ?>" required>
                        </div>
                        <div class="col-md-6">
                            <label class="form-label small text-muted text-uppercase fw-bold">Jenis Penilaian</label>
                            <select name="jenis_penilaian" id="inputJenis" class="form-select" required>
                                <option value="Harian">Penilaian Harian</option>
                                <option value="Sumatif">Sumatif</option>
                                <option value="Formatif">Formatif</option>
                                <option value="Projek">Projek</option>
                                <option value="Praktik">Praktik</option>
                            </select>
                        </div>
                        <div class="col-md-6">
                            <label class="form-label small text-muted text-uppercase fw-bold">Skala Penilaian</label>
                            <select name="skala_penilaian" id="inputSkala" class="form-select border-primary" required>
                                <option value="angka">Angka (0 - 100)</option>
                                <option value="huruf">Huruf (A - E)</option>
                            </select>
                            <small class="text-danger d-none" id="msgSkalaLocked"><i class="bi bi-lock-fill"></i> Terkunci saat Edit</small>
                        </div>
                        <div class="col-md-12">
                            <label class="form-label small text-muted text-uppercase fw-bold">Topik / Judul</label>
                            <input type="text" name="topik" id="inputTopik" class="form-control" placeholder="Contoh: PH 1 Listrik Dinamis" required>
                        </div>
                    </div>

                    <div class="my-4 border-top"></div>
                    
                    <div class="d-grid gap-2 mb-3" id="divTombolLoad">
                        <button type="button" id="btnLoadSiswa" class="btn btn-outline-primary py-2 fw-bold">
                            <i class="bi bi-people-fill me-2"></i> Load Data Siswa & Input Nilai
                        </button>
                    </div>

                    <div id="areaInputNilai" style="display: none;">
                        <h6 class="fw-bold mb-3 text-primary"><i class="bi bi-pencil-square me-2"></i>Input Nilai Siswa</h6>
                        <div class="table-responsive border rounded bg-light p-2">
                            <table class="table table-sm table-hover align-middle mb-0 bg-white shadow-sm rounded">
                                <thead class="table-light">
                                    <tr>
                                        <th class="ps-3 py-2">Nama Siswa</th>
                                        <th width="35%" class="py-2">Nilai</th>
                                    </tr>
                                </thead>
                                <tbody id="tabelSiswaBody"></tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="modal-footer bg-light">
                    <button type="button" class="btn btn-link text-muted text-decoration-none" data-bs-dismiss="modal">Batal</button>
                    <button type="submit" class="btn btn-primary px-4 fw-bold" id="btnSimpan">Simpan Data</button>
                </div>
            </div>
        </form>
    </div>
</div>

<form id="formCetak" action="<?php echo e(route('penilaian.print')); ?>" method="GET" target="_blank" style="display:none;">
    <input type="hidden" name="ids" id="idsCetak">
</form>
                           
<?php $__env->stopSection(); ?>  

<?php $__env->startSection('scripts'); ?>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script>
    // --- 8. FUNGSI SUBMIT CETAK TERPILIH (Pindah ke Global) ---
    function submitCetak() {
        var selectedIds = [];
        
        $('.check-item:checked').each(function() {
            selectedIds.push($(this).val());
        });

        if (selectedIds.length === 0) {
            alert("Pilih minimal satu data penilaian untuk dicetak!");
            return;
        }

        $('#idsCetak').val(selectedIds.join(','));
        $('#formCetak').submit();
    }


    document.addEventListener("DOMContentLoaded", function() {
        var $ = jQuery;
        
        // Inisialisasi Modal
        const modalElement = document.getElementById('modalForm');
        const modalInstance = new bootstrap.Modal(modalElement);

        // --- 1. MODAL TAMBAH BARU ---
        window.openModalCreate = function() {
            $('#formPenilaian')[0].reset();
            $('#formPenilaian').attr('action', "<?php echo e(route('penilaian.store')); ?>");
            $('#methodPut').html(''); 
            
            // UI Reset
            $('#modalTitle').html('<i class="bi bi-pencil-square"></i> Buat Penilaian Baru');
            $('#inputKelas').html('<option value="">-- Pilih Mapel Dulu --</option>').prop('disabled', false);
            $('#inputSkala').prop('disabled', false);
            $('#msgSkalaLocked').addClass('d-none');
            
            // Tampilkan tombol load, aktifkan (hapus disable), dan kembalikan warnanya
            $('#divTombolLoad').show();
            $('#btnLoadSiswa')
                .prop('disabled', false)
                .removeClass('btn-outline-secondary').addClass('btn-outline-primary')
                .html('<i class="bi bi-people-fill me-2"></i> Load Data Siswa & Input Nilai');
            
            $('#areaInputNilai').hide();
            $('#tabelSiswaBody').empty();

            modalInstance.show();
        }

        // --- 2. MODAL EDIT ---
        window.editPenilaian = function(id) {
            $('#modalTitle').text('Sedang memuat data...');
            $('#areaInputNilai').hide();
            
            // Kunci tombol Load Siswa sejak awal modal edit dibuka
            $('#divTombolLoad').show(); 
            $('#btnLoadSiswa')
                .prop('disabled', true)
                .removeClass('btn-outline-primary').addClass('btn-outline-secondary')
                .html('<i class="bi bi-lock-fill me-2"></i> Terkunci saat Edit');

            modalInstance.show();

            var url = "<?php echo e(route('penilaian.get_data', ':id')); ?>";
            url = url.replace(':id', id);

            $.ajax({
                url: url, 
                type: 'GET',
                success: function(data) {
                    var p = data.penilaian;
                    
                    // 1. Isi Data Form
                    $('#inputMapel').val(p.subject_id);
                    $('#inputTanggal').val(p.tanggal);
                    $('#inputJenis').val(p.jenis_penilaian);
                    $('#inputTopik').val(p.topik);

                    // 2. Isi Skala Penilaian
                    var skalaDb = p.skala_penilaian ? p.skala_penilaian : 'angka';
                    $('#inputSkala').val(skalaDb);
                    
                    if(p.skala_penilaian) {
                        $('#inputSkala').prop('disabled', true);
                        $('#msgSkalaLocked').removeClass('d-none');
                    } else {
                        $('#inputSkala').prop('disabled', false);
                        $('#msgSkalaLocked').addClass('d-none');
                    }

                    // 3. Load Kelas & Siswa
                    loadClassesForEdit(p.subject_id, p.kelas_id);

                    // 4. Setup Form Action
                    var updateUrl = "<?php echo e(route('penilaian.update', ':id')); ?>";
                    updateUrl = updateUrl.replace(':id', id);
                    
                    $('#formPenilaian').attr('action', updateUrl);
                    $('#methodPut').html('<input type="hidden" name="_method" value="PUT">');
                    $('#modalTitle').html('<i class="bi bi-pencil-square"></i> Edit Penilaian');

                    // 5. Tampilkan Tabel Siswa
                    $('#areaInputNilai').show();
                    renderRows(data.students, skalaDb);
                },
                error: function(xhr) {
                    console.error("Error:", xhr);
                    alert("Gagal mengambil data. Pastikan Anda sudah mengakses menu /bersih-bersih untuk reset cache.");
                    modalInstance.hide();
                }
            });
        }

        // --- 3. HELPER KHUSUS EDIT: Load Kelas lalu Select ---
        function loadClassesForEdit(subjectId, targetKelasId) {
            var kelasSelect = $('#inputKelas');
            kelasSelect.html('<option value="">Memuat...</option>');

            $.get("<?php echo e(route('ajax.penilaian.classes')); ?>", { subject_id: subjectId })
            .done(function(data) {
                kelasSelect.empty();
                if(data.length === 0) {
                    kelasSelect.html('<option value="">Tidak ada kelas</option>');
                } else {
                    kelasSelect.append('<option value="">-- Pilih Kelas --</option>');
                    $.each(data, function(index, k) {
                        kelasSelect.append(`<option value="${k.id}">${k.nama_kelas}</option>`);
                    });
                    
                    kelasSelect.val(targetKelasId);
                    kelasSelect.prop('disabled', true); 
                }
            });
        }

        // --- 4. HELPER BIASA: Load Kelas ---
        window.loadClasses = function() {
            var subjectId = $('#inputMapel').val();
            var kelasSelect = $('#inputKelas');

            if(!subjectId) {
                kelasSelect.html('<option value="">-- Pilih Mapel Dulu --</option>');
                return;
            }

            $.get("<?php echo e(route('ajax.penilaian.classes')); ?>", { subject_id: subjectId })
            .done(function(data) {
                kelasSelect.empty();
                if(data.length === 0) {
                    kelasSelect.html('<option value="">Tidak ada kelas</option>');
                } else {
                    kelasSelect.append('<option value="">-- Pilih Kelas --</option>');
                    $.each(data, function(index, k) {
                        kelasSelect.append(`<option value="${k.id}">${k.nama_kelas}</option>`);
                    });
                }
            });
        }

        // --- 5. HELPER LOAD SISWA ---
        $('#btnLoadSiswa').click(function() {
            var btn = $(this);
            var originalText = btn.html();
            var kelasId = $('#inputKelas').val();
            var skala = $('#inputSkala').val();

            if(!kelasId) { alert('Pilih Kelas Terlebih Dahulu!'); return; }

            btn.prop('disabled', true).html('<span class="spinner-border spinner-border-sm"></span> Memuat...');
            $('#areaInputNilai').show();
            $('#tabelSiswaBody').html('<tr><td colspan="2" class="text-center py-3 text-muted">Sedang mengambil data siswa...</td></tr>');

            var url = "<?php echo e(route('api.get_siswa', ':id')); ?>".replace(':id', kelasId);

            $.ajax({
                url: url,
                type: 'GET',
                success: function(response) {
                    renderRows(response, skala);
                    btn.prop('disabled', false).html(originalText);
                },
                error: function() {
                    $('#tabelSiswaBody').html('<tr><td colspan="2" class="text-center text-danger">Gagal memuat data.</td></tr>');
                    btn.prop('disabled', false).html(originalText);
                }
            });
        });

        // --- 6. RENDER ROWS ---
        function renderRows(students, skala) {
            var html = '';
            var optionsHuruf = ['A', 'A-', 'B+', 'B', 'B-', 'C+', 'C', 'C-', 'D+', 'D', 'E'];

            if(!students || students.length === 0) {
                $('#tabelSiswaBody').html('<tr><td colspan="2" class="text-center text-danger py-3">Tidak ada data siswa.</td></tr>');
                return;
            }

            $.each(students, function(i, s) {
                var nilaiLama = s.existing_nilai; 
                if (nilaiLama === null || nilaiLama === undefined) nilaiLama = '';

                var input = '';

                if(skala === 'angka') {
                    input = `<input type="number" name="nilai[${s.id}]" class="form-control form-control-sm border-secondary-subtle" placeholder="0-100" value="${nilaiLama}" min="0" max="100">`;
                } else {
                    var opts = `<option value="">-- Pilih --</option>`;
                    optionsHuruf.forEach(function(h) {
                        var selected = (nilaiLama == h) ? 'selected' : '';
                        opts += `<option value="${h}" ${selected}>${h}</option>`;
                    });
                    input = `<select name="nilai[${s.id}]" class="form-select form-select-sm border-secondary-subtle">${opts}</select>`;
                }

                html += `
                    <tr>
                        <td class="ps-3 fw-medium text-dark">
                            ${s.name}
                            <input type="hidden" name="siswa_id[]" value="${s.id}">
                        </td>
                        <td>${input}</td>
                    </tr>`;
            });
            $('#tabelSiswaBody').html(html);
        }

        // Logic UI Tambahan
        $('#inputKelas, #inputSkala').change(function() {
             if($('#divTombolLoad').is(':visible')) {
                 $('#areaInputNilai').hide();
                 $('#tabelSiswaBody').empty();
             }
        });

        // --- LOGIKA CHECKBOX ---
        $('#checkAllGlobal').click(function() {
            $('.check-item, .checkAll-group').prop('checked', this.checked);
            toggleBtnCetak();
        });

        $(document).on('click', '.checkAll-group', function() {
            let table = $(this).closest('table');
            table.find('.check-item').prop('checked', this.checked);
            toggleBtnCetak();
        });

        $(document).on('change', '.check-item', function() {
            toggleBtnCetak();
            
            if(!this.checked) {
                $('#checkAllGlobal').prop('checked', false);
                $(this).closest('table').find('.checkAll-group').prop('checked', false);
            }
        });

        function toggleBtnCetak() {
            var count = $('.check-item:checked').length;
            $('#btnCetak').prop('disabled', count === 0).html(`<i class="bi bi-printer me-1"></i> Cetak (${count})`);
        }
    });
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/vol15_7/infinityfree.com/if0_40829333/htdocs/resources/views/pages/pembelajaran/penilaian/index.blade.php ENDPATH**/ ?>