<?= $this->extend('layouts/enterprise') ?>

<?= $this->section('content') ?>

<?= view('partials/workspace_hero', [
    'workspaceCrumbPill'    => 'HRM',
    'workspaceCrumbCurrent'   => 'New Employee',
    'workspaceTitle'        => 'Employee Onboarding Workspace',
    'workspaceDesc'         => 'Register a new personnel record. Only the full name is required — employee ID is auto-generated with optional custom override. Complete CPR, photo, and payroll details as available.',
]) ?>

<div class="alert alert-info small enterprise-alert">
    <i class="fa-solid fa-circle-info me-1"></i>
    Only <strong>Full Name</strong> is required. Employee ID defaults to <code><?= esc($nextEmployeeId) ?></code> unless you enable a custom ID.
</div>

<form action="<?= base_url('employees') ?>" method="post" enctype="multipart/form-data" novalidate>
    <?= csrf_field() ?>
    <?= $this->include('Modules\Employees\Views\_form') ?>
    <div class="enterprise-settings-card__footer" style="border-top:none;padding-top:0;margin-top:0;">
        <a href="<?= base_url('employees') ?>" class="btn btn-outline-secondary">Cancel</a>
        <button type="submit" class="btn btn-primary">Create Employee Record</button>
    </div>
</form>

<?= $this->endSection() ?>
