@extends('guru.layout')

@section('title', '')

@section('content')
    @includeIf('admin.penilaian.ekstrakulikuler.index')

    @php $defK = optional($kelasList->first())->id ?? null; @endphp
    <script>
        document.addEventListener('DOMContentLoaded', function(){
            try {
                var def = {!! json_encode($defK) !!};
                if (!def) return;
                var sel = document.querySelector('select[name="filter_kelas"]');
                if (sel) {
                    sel.value = def;
                    sel.dispatchEvent(new Event('change', { bubbles: true }));
                }
            } catch(e){ console.error(e); }
        });
    </script>
@endsection
