@includeIf('admin.penilaian.intrakulikuler.template')

@push('scripts')
<script>
document.addEventListener('DOMContentLoaded', function(){
	try {
		// If this is the guru area and the kelas select exists, auto-select the first owned kelas
		var sel = document.getElementById('templateKelas');
		@if(!empty($kelases) && $kelases->count())
			var firstId = '{{ $kelases->first()->id }}';
			if (sel && !sel.value) {
				sel.value = firstId;
				sel.dispatchEvent(new Event('change'));
			}
		@endif
	} catch(e) { /* ignore */ }
});
</script>
@endpush
