<?php ($staffMember = $staffMember ?? null); ?>

<div style="display:grid; grid-template-columns: repeat(2, 1fr); gap:16px;">
    <div class="form-group">
        <label class="form-label" for="staff_number">Staff Number</label>
        <input class="input" type="text" id="staff_number" name="staff_number"
               value="<?php echo e(old('staff_number', $staffMember?->staff_number ?? ($suggestedStaffNumber ?? ''))); ?>"
               placeholder="Leave blank to auto-generate">
    </div>
    <div class="form-group">
        <label class="form-label" for="status">Status</label>
        <select class="input" id="status" name="status">
            <?php $__currentLoopData = ['active', 'inactive', 'on_leave', 'terminated']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $status): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <option value="<?php echo e($status); ?>" <?php if(old('status', $staffMember?->status ?? 'active') === $status): echo 'selected'; endif; ?>><?php echo e(ucfirst(str_replace('_', ' ', $status))); ?></option>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </select>
    </div>
    <div class="form-group">
        <label class="form-label" for="first_name">First Name</label>
        <input class="input" type="text" id="first_name" name="first_name" value="<?php echo e(old('first_name', $staffMember?->first_name)); ?>" required>
    </div>
    <div class="form-group">
        <label class="form-label" for="last_name">Last Name</label>
        <input class="input" type="text" id="last_name" name="last_name" value="<?php echo e(old('last_name', $staffMember?->last_name)); ?>" required>
    </div>
    <div class="form-group">
        <label class="form-label" for="other_names">Other Names</label>
        <input class="input" type="text" id="other_names" name="other_names" value="<?php echo e(old('other_names', $staffMember?->other_names)); ?>">
    </div>
    <div class="form-group">
        <label class="form-label" for="email">Email</label>
        <input class="input" type="email" id="email" name="email" value="<?php echo e(old('email', $staffMember?->email)); ?>">
    </div>
    <div class="form-group">
        <label class="form-label" for="phone">Phone</label>
        <input class="input" type="text" id="phone" name="phone" value="<?php echo e(old('phone', $staffMember?->phone)); ?>">
    </div>
    <div class="form-group">
        <label class="form-label" for="hire_date">Hire Date</label>
        <input class="input" type="date" id="hire_date" name="hire_date" value="<?php echo e(old('hire_date', optional($staffMember?->hire_date)->format('Y-m-d'))); ?>">
    </div>
    <div class="form-group">
        <label class="form-label" for="job_title">Job Title</label>
        <input class="input" type="text" id="job_title" name="job_title" value="<?php echo e(old('job_title', $staffMember?->job_title)); ?>">
    </div>
    <div class="form-group">
        <label class="form-label" for="department">Department</label>
        <input class="input" type="text" id="department" name="department" value="<?php echo e(old('department', $staffMember?->department)); ?>">
    </div>
    <?php if($canViewSalary ?? false): ?>
        <div class="form-group">
            <label class="form-label" for="salary">Salary</label>
            <input class="input" type="number" step="0.01" id="salary" name="salary" value="<?php echo e(old('salary', $staffMember?->salary)); ?>">
        </div>
    <?php endif; ?>
</div>
<?php /**PATH C:\laragon\www\southend\resources\views\admin\staff\_form.blade.php ENDPATH**/ ?>