<?php if (isset($component)) { $__componentOriginal53747ceb358d30c0105769f8471417f6 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal53747ceb358d30c0105769f8471417f6 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.card','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('card'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
    <div class="flex items-center justify-between">
        <div>
            <h3 class="text-sm font-semibold text-slate-900">Leave Rules</h3>
            <p class="mt-1 text-xs text-slate-500">Configure types and rules</p>
        </div>
    </div>

    <div class="mt-4 space-y-2">
        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $leaveTypes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $type): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <?php
                $cardThemes = [
                    [
                        'idle' => 'border-sky-200 bg-sky-50/70 hover:border-sky-300 hover:bg-sky-50',
                        'active' => 'border-sky-500 bg-sky-50 ring-1 ring-sky-200',
                        'icon' => 'bg-sky-100 text-sky-700',
                    ],
                    [
                        'idle' => 'border-emerald-200 bg-emerald-50/70 hover:border-emerald-300 hover:bg-emerald-50',
                        'active' => 'border-emerald-500 bg-emerald-50 ring-1 ring-emerald-200',
                        'icon' => 'bg-emerald-100 text-emerald-700',
                    ],
                    [
                        'idle' => 'border-amber-200 bg-amber-50/70 hover:border-amber-300 hover:bg-amber-50',
                        'active' => 'border-amber-500 bg-amber-50 ring-1 ring-amber-200',
                        'icon' => 'bg-amber-100 text-amber-700',
                    ],
                    [
                        'idle' => 'border-violet-200 bg-violet-50/70 hover:border-violet-300 hover:bg-violet-50',
                        'active' => 'border-violet-500 bg-violet-50 ring-1 ring-violet-200',
                        'icon' => 'bg-violet-100 text-violet-700',
                    ],
                    [
                        'idle' => 'border-rose-200 bg-rose-50/70 hover:border-rose-300 hover:bg-rose-50',
                        'active' => 'border-rose-500 bg-rose-50 ring-1 ring-rose-200',
                        'icon' => 'bg-rose-100 text-rose-700',
                    ],
                    [
                        'idle' => 'border-cyan-200 bg-cyan-50/70 hover:border-cyan-300 hover:bg-cyan-50',
                        'active' => 'border-cyan-500 bg-cyan-50 ring-1 ring-cyan-200',
                        'icon' => 'bg-cyan-100 text-cyan-700',
                    ],
                ];
                $theme = $cardThemes[$loop->index % count($cardThemes)];
                $isActive = $selectedLeaveType && $selectedLeaveType->id === $type->id;
            ?>
            <a href="<?php echo e(route('leave-types.manage', ['leave_type_id' => $type->id, 'tab' => request('tab', 'general')])); ?>"
               class="block rounded-lg border px-3 py-2 transition <?php echo e($isActive ? $theme['active'] : $theme['idle']); ?>">
                <div class="flex items-start justify-between gap-2">
                    <div class="min-w-0">
                        <p class="truncate text-sm font-medium text-slate-900"><?php echo e($type->name); ?></p>
                        <p class="mt-0.5 text-xs text-slate-500">
                            <?php echo e(($leaveTypeEmployeeCounts[$type->id] ?? 0)); ?> Employees
                        </p>
                    </div>
                    <span class="mt-0.5 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-xs font-semibold <?php echo e($theme['icon']); ?>">
                        <?php echo e(strtoupper(mb_substr($type->short_code ?: $type->name, 0, 1))); ?>

                    </span>
                </div>
            </a>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
    </div>

    <div class="mt-4 border-t border-slate-200 pt-4">
        <a href="<?php echo e(route('leave-types.create')); ?>" class="inline-flex w-full items-center justify-center rounded-lg bg-slate-800 px-4 py-2 text-sm font-medium text-white hover:bg-slate-700">
            <i class="bi bi-plus-lg me-1"></i>Create New Rule
        </a>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal53747ceb358d30c0105769f8471417f6)): ?>
<?php $attributes = $__attributesOriginal53747ceb358d30c0105769f8471417f6; ?>
<?php unset($__attributesOriginal53747ceb358d30c0105769f8471417f6); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal53747ceb358d30c0105769f8471417f6)): ?>
<?php $component = $__componentOriginal53747ceb358d30c0105769f8471417f6; ?>
<?php unset($__componentOriginal53747ceb358d30c0105769f8471417f6); ?>
<?php endif; ?>

<?php /**PATH /var/www/html/kiyohr/v2_version/resources/views/leave-types/partials/_sidebar.blade.php ENDPATH**/ ?>