@extends('layouts.app')
@section('title', 'Assign Leadership')
@section('content')
    <x-page-head title="Assign Leadership" subtitle="{{ $student->full_name }}">
        <x-slot:actions><a href="{{ route('school.leadership.index') }}" class="btn btn-outline">Back</a></x-slot:actions>
    </x-page-head>
    <x-panel>
        <form method="POST" action="{{ route('school.leadership.update', $student) }}">
            @csrf @method('PUT')
            <div class="form-group" style="max-width:400px;">
                <label class="form-label" for="leadership_role">Leadership Role</label>
                <select class="input" id="leadership_role" name="leadership_role">
                    <option value="">— None —</option>
                    @foreach ($leadershipRoles as $key => $label)
                        <option value="{{ $key }}" @selected(old('leadership_role', $student->leadership_role) === $key)>{{ $label }}</option>
                    @endforeach
                </select>
            </div>
            <button type="submit" class="btn btn-primary" style="margin-top:16px;">Save Role</button>
        </form>
    </x-panel>
@endsection
