<?php
    // Variable for the form
    $form = 'criticalityFormID';
    $button = [
        'save' => 'criticalitySaveData',
        'close' => 'criticalityCloseForm',
    ];

    // Get data
    $id = !empty($data) && !empty($data['id']) ? (int) $data['id'] : 0;
    $name = !empty($data) && !empty($data['name']) ? ucfirst($data['name']) : '';
    $description = !empty($data) && !empty($data['description']) ? ucfirst($data['description']) : '';
    $deadlines = !empty($data) && !empty($data['deadlines']) ? ucfirst($data['deadlines']) : '';

    // Form title
    $title = !empty($id) ? $name : 'Ajouter une criticité';

?>

<form id="<?php echo e($form); ?>">
    <?php echo csrf_field(); ?>
    <input type="hidden" name="rowID" value="<?php echo e($id); ?>">
    <div class="modal-header bg-primary">
        <h3 class="modal-title fw-light text-uppercase text-white fs-5"><?php echo e($title); ?></h3>
        <!--begin::Close-->
        <div class="btn btn-icon btn-sm  ms-2" data-bs-dismiss="modal" aria-label="Close">
            <i class="ki-duotone ki-cross fs-1 text-white"><span class="path1"></span><span class="path2"></span></i>
        </div>
        <!--end::Close-->
    </div>

    <div class="modal-body">
        <!--begin::Input-->
        <div class="fv-row mb-5 row">
            <div class="col-md-6">
                <!--begin::Label-->
                <label class="d-flex align-items-center fs-5 fw-semibold mb-2">
                    <span class="required">Criticité</span>
                    </span>
                </label>
                <!--end::Label-->
                <!--begin::Input-->
                <input type="text" class="form-control form-control-lg form-control-solid" name="name"
                    value="<?php echo e($name); ?>">
                <!--end::Input-->
            </div>
            <div class="col-md-6">
                <!--begin::Label-->
                <label class="d-flex align-items-center fs-5 fw-semibold mb-2">
                    <span class="required">Criticité</span>
                    </span>
                </label>
                <!--end::Label-->
                <!--begin::Input-->
                <input type="number" class="form-control form-control-lg form-control-solid" name="deadlines" min="1"
                    value="<?php echo e($deadlines); ?>">
                    <span class="text-danger">Saisir le délais en Heure</span>
                <!--end::Input-->
            </div>
        </div>
        <!--end::Input-->

        <!--begin::textarea-->
        <div class="fv-row mb-5">
            <!--begin::Label-->
            <label class="d-flex align-items-center fs-5 fw-semibold mb-2">
                <span>Description</span>
            </label>
            <!--end::Label-->
            <!--begin::textarea-->
            <textarea class="form-control form-control-lg form-control-solid" name="description" id="description" cols="2"
                rows="2" style="resize: none"><?php echo e($description); ?></textarea>
            <!--end::textarea-->
        </div>
        <!--end::Input-->

    </div>
    <div class="modal-footer justify-content-center">
        <a href="javascript:;" class="btn btn-danger" data-bs-dismiss="modal" aria-label="Close"
            id="<?php echo e($button['close']); ?>">Fermer</a>
        <button type="submit" class="btn btn-primary" id="<?php echo e($button['save']); ?>">Ajouter</button>
    </div>
</form>
<?php /**PATH C:\laragon\www\helpdesk\resources\views/backoffice/settings/criticality/form.blade.php ENDPATH**/ ?>