
<?php $selected = $selected ?? []; ?>
<?php if (! $__env->hasRenderedOnce('9fb507c9-4df7-44fc-b3ed-07f408076b1e')): $__env->markAsRenderedOnce('9fb507c9-4df7-44fc-b3ed-07f408076b1e'); ?>
<style>
    .stype-chips { display: flex; flex-wrap: wrap; gap: 5px; }
    .stype-chip {
        display: inline-flex; align-items: center; cursor: pointer; user-select: none; margin: 0;
        border: 1px solid #e2e8f0; background: #fff; color: #64748b;
        border-radius: 8px; padding: 4px 10px;
        font-size: .72rem; font-weight: 700; line-height: 1.4;
        transition: border-color .14s, color .14s, background .14s;
    }
    .stype-chip:hover { border-color: #bfdbfe; color: #1d4ed8; }
    .stype-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
    .stype-chip:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(37, 99, 235, .16); }
    .stype-chip.active { border-color: #0f172a; background: #0f172a; color: #fff; }
</style>
<?php endif; ?>
<div class="stype-chips" data-supplier-type-chips>
    <?php $__currentLoopData = \App\Models\Supplier\Supplier::supplierTypes(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $val => $label): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <label class="stype-chip <?php echo e(in_array($val, $selected) ? 'active' : ''); ?>">
            <input type="checkbox" name="supplier_types[]" value="<?php echo e($val); ?>" <?php if(in_array($val, $selected)): echo 'checked'; endif; ?>>
            <span><?php echo e($label); ?></span>
        </label>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
<?php if (! $__env->hasRenderedOnce('b32fdff4-7362-43db-8edc-29514d8c53b1')): $__env->markAsRenderedOnce('b32fdff4-7362-43db-8edc-29514d8c53b1'); ?>
<script>
(function () {
    if (window.__stypeChipsBound) return;
    window.__stypeChipsBound = true;
    document.addEventListener('change', function (e) {
        var cb = e.target.closest('[data-supplier-type-chips] input[type="checkbox"]');
        if (!cb) return;
        cb.closest('.stype-chip').classList.toggle('active', cb.checked);
    });
})();
</script>
<?php endif; ?>
<?php /**PATH C:\xampp\htdocs\acente\resources\views/agency/suppliers/_type-chips.blade.php ENDPATH**/ ?>