@extends('layouts.student')
@section('title', 'School Calendar')
@section('content')
    <x-page-head title="Events & Functions" subtitle="School calendar">
        @if(app(\App\Services\School\EventManagementService::class)->canManageEvents(auth()->user()))
            <x-slot:actions><a href="{{ route('student.events.index') }}" class="btn btn-outline">Manage Events</a></x-slot:actions>
        @endif
    </x-page-head>
    <x-panel>
        @include('events._list', ['events' => $events, 'eventsService' => $eventsService])
        {{ $events->links() }}
    </x-panel>
@endsection
