@extends('layouts.parent')
@section('title', 'Timetable')
@section('content')
    <x-page-head title="Timetable & Events" subtitle="Children's schedules" />
    @forelse ($schedules as $entry)
        <h3 style="margin:20px 0 8px;">{{ $entry['student']->full_name }} — {{ $entry['class']?->name ?? 'Unassigned' }}</h3>
        <x-timetable-schedule :schedule="$entry['schedule']" :title="$entry['class']?->name ?? 'Schedule'" />
    @empty
        <x-panel><x-empty-state title="No children linked" message="Link your guardian account to view timetables." /></x-panel>
    @endforelse
@endsection
