<?php $__env->startSection('content'); ?>
<div class="bg-gray-100 min-h-full p-4 flex justify-center">

    <div class="bg-white shadow-sm border border-gray-200 w-full max-w-5xl">
        
        <!-- Header -->
        <div class="bg-[#ff9800] text-white px-3 py-1.5 font-bold text-sm flex items-center shadow-sm">
            <i class="fa-solid fa-pen-to-square mr-2"></i> Add/Edit Leave Details
        </div>

        <form action="<?php echo e(route('leave-types.store')); ?>" method="POST" class="p-6">
            <?php echo csrf_field(); ?>

            <!-- Form Content -->
            <div class="mb-4">
                <h3 class="text-[#ff5722] font-bold text-sm mb-4">Define Leave Details</h3>
                
                <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
                    <div>
                        <label class="block text-xs font-bold text-gray-800 mb-1">Leave Code</label>
                        <input type="text" name="leave_code" value="<?php echo e(old('leave_code')); ?>" required class="w-full border border-gray-300 px-3 py-1.5 text-sm focus:outline-none focus:border-[#ff9800]">
                        <?php $__errorArgs = ['leave_code'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <span class="text-red-500 text-xs"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    <div>
                        <label class="block text-xs font-bold text-gray-800 mb-1">Leave Type Name</label>
                        <input type="text" name="leave_name" value="<?php echo e(old('leave_name')); ?>" required class="w-full border border-gray-300 px-3 py-1.5 text-sm focus:outline-none focus:border-[#ff9800]">
                        <?php $__errorArgs = ['leave_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <span class="text-red-500 text-xs"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    <div>
                        <label class="block text-xs font-bold text-gray-800 mb-1">Leave Type (Yearly/Monthly)</label>
                        <select name="leave_type" class="w-full border border-gray-300 px-3 py-1.5 text-sm focus:outline-none focus:border-[#ff9800] text-gray-600">
                            <option value="Yearly" <?php echo e(old('leave_type') == 'Yearly' ? 'selected' : ''); ?>>Yearly</option>
                            <option value="Monthly" <?php echo e(old('leave_type') == 'Monthly' ? 'selected' : ''); ?>>Monthly</option>
                        </select>
                        <?php $__errorArgs = ['leave_type'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <span class="text-red-500 text-xs"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                </div>
            </div>

            <!-- Holidays and weekly Off Summary Section -->
            <div class="mb-6 border border-gray-200">
                <div class="bg-[#ff9800] text-white px-3 py-1.5 font-bold text-xs shadow-sm">
                    Holidays and weekly Off Summary
                </div>
                <div class="bg-gray-50 p-4 flex flex-wrap gap-8 justify-around">
                    <label class="flex items-center space-x-2 cursor-pointer">
                        <input type="checkbox" name="include_weekly_off" value="1" <?php echo e(old('include_weekly_off') ? 'checked' : ''); ?> class="h-4 w-4 text-[#ff5722] focus:ring-[#ff5722] border-gray-300 rounded">
                        <span class="text-xs font-bold text-gray-800">Weekly off Incude(Yes/No)</span>
                    </label>
                    <label class="flex items-center space-x-2 cursor-pointer">
                        <input type="checkbox" name="include_holiday" value="1" <?php echo e(old('include_holiday') ? 'checked' : ''); ?> class="h-4 w-4 text-[#ff5722] focus:ring-[#ff5722] border-gray-300 rounded">
                        <span class="text-xs font-bold text-gray-800">Holiday Incude(Yes/No)</span>
                    </label>
                    <label class="flex items-center space-x-2 cursor-pointer">
                        <input type="checkbox" name="is_paid_leave" value="1" <?php echo e(old('is_paid_leave') ? 'checked' : ''); ?> class="h-4 w-4 text-[#ff5722] focus:ring-[#ff5722] border-gray-300 rounded">
                        <span class="text-xs font-bold text-gray-800">Paid Leave</span>
                    </label>
                    <label class="flex items-center space-x-2 cursor-pointer">
                        <input type="checkbox" name="is_carry_forward" value="1" <?php echo e(old('is_carry_forward') ? 'checked' : ''); ?> class="h-4 w-4 text-[#ff5722] focus:ring-[#ff5722] border-gray-300 rounded">
                        <span class="text-xs font-bold text-gray-800">Is-Leave Carry Forward</span>
                    </label>
                </div>
            </div>

            <!-- Action Buttons -->
            <div class="mt-8 flex justify-center space-x-2">
                <button type="submit" class="bg-[#4caf50] hover:bg-[#43a047] text-white px-6 py-1.5 rounded shadow text-sm font-semibold transition">Save</button>
                <a href="<?php echo e(route('leave-types.index')); ?>" class="bg-[#dc3545] hover:bg-[#c82333] text-white px-6 py-1.5 rounded shadow text-sm font-semibold transition">Cancel</a>
            </div>

        </form>
    </div>

</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\realtime\resources\views/admin/leave_types/create.blade.php ENDPATH**/ ?>