@extends('layouts.app')

@section('title', 'Student Registration | Institution Axis')

@section('sidebar-menu')
    @include('schooladmin.partials.sidebar')
@endsection

@section('sidebar-footer')
    <p>{{ auth()->user()->school?->name ?? 'Institution Axis' }}</p>
@endsection

@section('breadcrumb')
    <span><a href="{{ route('schooladmin.dashboard') }}">Home</a></span> / <span><a href="{{ route('schooladmin.students.index') }}">Students</a></span> / <span class="active-page">Registration</span>
@endsection

@section('content')
    <div class="card shadow-sm rounded-4 border-0">
        <div class="card-header bg-white">
            <h5><i class="fas fa-user-plus text-primary"></i> Register New Student</h5>
        </div>
        <div class="card-body">
            <form action="{{ route('schooladmin.students.store') }}" method="POST">
                @csrf
                <div class="row g-3">
                    <div class="col-md-4">
                        <label class="form-label">First Name *</label>
                        <input type="text" name="first_name" class="form-control" required>
                    </div>
                    <div class="col-md-4">
                        <label class="form-label">Last Name *</label>
                        <input type="text" name="last_name" class="form-control" required>
                    </div>
                    <div class="col-md-4">
                        <label class="form-label">Admission Number *</label>
                        <input type="text" name="admission_number" class="form-control" required>
                    </div>
                    <div class="col-md-4">
                        <label class="form-label">Date of Birth</label>
                        <input type="date" name="date_of_birth" class="form-control">
                    </div>
                    <div class="col-md-4">
                        <label class="form-label">Gender</label>
                        <select name="gender" class="form-select">
                            <option value="male">Male</option>
                            <option value="female">Female</option>
                        </select>
                    </div>
                    <div class="col-md-4">
                        <label class="form-label">Parent Phone</label>
                        <input type="text" name="parent_phone" class="form-control">
                    </div>
                    <div class="col-md-12">
                        <label class="form-label">Bio (Optional)</label>
                        <textarea name="bio" class="form-control" rows="3"></textarea>
                    </div>
                </div>
                <div class="mt-4 text-end">
                    <button type="submit" class="btn btn-primary"><i class="fas fa-save"></i> Register Student</button>
                </div>
            </form>
        </div>
    </div>
@endsection
