@csrf
<div class="row g-3">
    <div class="col-md-5"><label class="form-label">Class Name <span class="text-danger">*</span></label>
        <input type="text" name="name" value="{{ old('name', $class->name) }}" class="form-control @error('name') is-invalid @enderror" placeholder="Grade 1" required>
        @error('name')<div class="invalid-feedback">{{ $message }}</div>@enderror</div>
    <div class="col-md-3"><label class="form-label">Level (order)</label>
        <input type="number" name="level" value="{{ old('level', $class->level ?? 0) }}" class="form-control" min="0">
        <div class="form-text">Used for promotion sequencing.</div></div>
    <div class="col-md-2 d-flex align-items-center"><div class="form-check mt-3"><input type="checkbox" name="is_active" value="1" id="is_active" class="form-check-input" @checked(old('is_active', $class->is_active ?? true))><label for="is_active" class="form-check-label">Active</label></div></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('classes.index') }}" class="btn btn-light border">Cancel</a>
</div>
