<div class="livewire-component-wrapper">
	<!-- Add Modal -->
          <div wire:ignore.self class="modal fade" id="addModal" tabindex="-1" aria-hidden="true">
            <div class="modal-dialog" role="document">
              <div class="modal-content">
                <form class="needs-validation" novalidate>
				<?php echo csrf_field(); ?>
                <div class="modal-header">
                  <h5 class="modal-title" id="editModalLabel1">Add Department</h5>
                  <button type="button" class="btn-close rmv_modal_backdrop" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <div class="modal-body">
                  <div class="row">
				  
                    <div class="col-md-12 mb-3">
                      <label for="addDepartment" class="form-label">Department Name</label>
                      <input type="text" name="DepartmentName" wire:model="DepartmentName" class="form-control" placeholder="Department Name" value="<?php echo e(old('DepartmentName')); ?>" required>
					  <!--[if BLOCK]><![endif]--><?php $__errorArgs = ['DepartmentName'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <span class="text-danger alert-sm"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><!--[if ENDBLOCK]><![endif]-->
					      <div class="invalid-feedback">Department name is required</div>
                    </div>
				
					<div class="col-md-12 mb-3">
                      <label for="addDescription" class="form-label">Description</label>
                      <textarea name="Description" rows="4" wire:model="Description" class="form-control" placeholder="Description" required><?php echo e(old('Description')); ?></textarea>
					  <!--[if BLOCK]><![endif]--><?php $__errorArgs = ['Description'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <span class="text-danger alert-sm"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><!--[if ENDBLOCK]><![endif]-->
					      <div class="invalid-feedback">Description is required</div>
                    </div>
					
                  </div>	
                </div>
                <div class="modal-footer">
				  <button type="button" class="btn btn-kco-green" wire:click="saveDepartment">Save</button>
                  <button type="button" class="btn btn-outline-kco rmv_modal_backdrop" data-bs-dismiss="modal">Close</button>
                </div>
			  </form>
              </div>
            </div>
          </div>

		<!-- edit Modal -->
          <div wire:ignore.self class="modal fade" id="editModal" tabindex="-1" aria-hidden="true">
            <div class="modal-dialog" role="document">
              <div class="modal-content">
                <form class="needs-validation" novalidate>
				<?php echo csrf_field(); ?>
                <div class="modal-header">
                  <h5 class="modal-title" id="editModalLabel1">Edit Department</h5>
                  <button type="button" class="btn-close rmv_modal_backdrop" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <div class="modal-body">
                  <div class="row">
				  
                    <div class="col-md-12 mb-3">
                      <label for="editDepartment" class="form-label">Department Name</label>
                      <input type="text" name="DepartmentName" wire:model="DepartmentName" class="form-control" required>
					  <!--[if BLOCK]><![endif]--><?php $__errorArgs = ['DepartmentName'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <span class="text-danger alert-sm"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><!--[if ENDBLOCK]><![endif]-->
					      <div class="invalid-feedback">Department name is required</div>
                    </div>

					<div class="col-md-12 mb-3">
                      <label for="editDescription" class="form-label">Description</label>
                      <textarea name="Description" rows="4" wire:model="Description" class="form-control" placeholder="Description" required><?php echo e(old('Description')); ?></textarea>
					  <!--[if BLOCK]><![endif]--><?php $__errorArgs = ['Description'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <span class="text-danger alert-sm"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><!--[if ENDBLOCK]><![endif]-->
					      <div class="invalid-feedback">Description is required</div>
                    </div>
					
                  </div>	
                </div>
                <div class="modal-footer">
				  <button type="button" class="btn btn-kco-green" wire:click="updateDepartment">Update</button>
                  <button type="button" class="btn btn-outline-kco rmv_modal_backdrop" data-bs-dismiss="modal">Close</button>
                </div>
			  </form>
              </div>
            </div>
          </div>
		  
</div><?php /**PATH C:\xampp\htdocs\kcofbms3\resources\views/livewire/departments.blade.php ENDPATH**/ ?>