@csrf
<div class="row g-3">
    <div class="col-md-6"><label class="form-label">Student Name <span class="text-danger">*</span></label>
        <input type="text" name="student_name" value="{{ old('student_name', $inquiry->student_name) }}" class="form-control @error('student_name') is-invalid @enderror" required>
        @error('student_name')<div class="invalid-feedback">{{ $message }}</div>@enderror</div>
    <div class="col-md-6"><label class="form-label">Parent Name</label>
        <input type="text" name="parent_name" value="{{ old('parent_name', $inquiry->parent_name) }}" class="form-control"></div>
    <div class="col-md-4"><label class="form-label">Contact <span class="text-danger">*</span></label>
        <input type="text" name="contact" value="{{ old('contact', $inquiry->contact) }}" class="form-control @error('contact') is-invalid @enderror" required>
        @error('contact')<div class="invalid-feedback">{{ $message }}</div>@enderror</div>
    <div class="col-md-4"><label class="form-label">Email</label>
        <input type="email" name="email" value="{{ old('email', $inquiry->email) }}" class="form-control"></div>
    <div class="col-md-4"><label class="form-label">Class Interested</label>
        <select name="class_id" class="form-select">
            <option value="">—</option>
            @foreach($classes as $class)<option value="{{ $class->id }}" @selected(old('class_id',$inquiry->class_id)==$class->id)>{{ $class->name }}</option>@endforeach
        </select></div>
    <div class="col-md-4"><label class="form-label">Source</label>
        <select name="source" class="form-select">
            @foreach(['Walk-in','Phone','Website','Referral','Social Media'] as $src)
                <option value="{{ $src }}" @selected(old('source',$inquiry->source)===$src)>{{ $src }}</option>
            @endforeach
        </select></div>
    <div class="col-md-4"><label class="form-label">Status</label>
        <select name="status" class="form-select text-capitalize">
            @foreach(App\Models\Inquiry::STATUSES as $s)<option value="{{ $s }}" @selected(old('status',$inquiry->status ?? 'new')===$s)>{{ $s }}</option>@endforeach
        </select></div>
    <div class="col-md-4"><label class="form-label">Follow-up Date</label>
        <input type="date" name="follow_up_date" value="{{ old('follow_up_date', optional($inquiry->follow_up_date)->format('Y-m-d')) }}" class="form-control"></div>
    <div class="col-12"><label class="form-label">Notes</label>
        <textarea name="notes" rows="2" class="form-control">{{ old('notes', $inquiry->notes) }}</textarea></div>
</div>
<div class="mt-3 d-flex gap-2">
    <button class="btn btn-primary"><i class="bi bi-check-lg me-1"></i>{{ $submitLabel ?? 'Save' }}</button>
    <a href="{{ route('inquiries.index') }}" class="btn btn-light border">Cancel</a>
</div>
