<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;

$__newAttributes = [];
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames(([
    'name',
    'label' => null,
    'value' => null,
]));

foreach ($attributes->all() as $__key => $__value) {
    if (in_array($__key, $__propNames)) {
        $$__key = $$__key ?? $__value;
    } else {
        $__newAttributes[$__key] = $__value;
    }
}

$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);

unset($__propNames);
unset($__newAttributes);

foreach (array_filter(([
    'name',
    'label' => null,
    'value' => null,
]), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
    $$__key = $$__key ?? $__value;
}

$__defined_vars = get_defined_vars();

foreach ($attributes->all() as $__key => $__value) {
    if (array_key_exists($__key, $__defined_vars)) unset($$__key);
}

unset($__defined_vars, $__key, $__value); ?>

<?php
    $error = $errors->first($name);
    $inputId = $attributes->get('id', $name);
?>

<div>
    <?php if($label): ?>
        <label for="<?php echo e($inputId); ?>" class="mb-2 block text-sm font-semibold text-slate-700"><?php echo e($label); ?></label>
    <?php endif; ?>
    <select
        id="<?php echo e($inputId); ?>"
        name="<?php echo e($name); ?>"
        <?php echo e($attributes->except('id')->merge([
            'class' => 'select2 block w-full rounded-lg border px-3 py-2 text-sm text-slate-700 shadow-sm focus:border-amber-400 focus:ring-amber-200 ' . ($error ? 'border-rose-400' : 'border-amber-100'),
        ])); ?>

    >
        <?php echo e($slot); ?>

    </select>
    <?php if($error): ?>
        <p class="mt-1 text-xs text-rose-600"><?php echo e($error); ?></p>
    <?php endif; ?>
</div>
<?php /**PATH C:\laragon\www\foodcourt\resources\views\components\select.blade.php ENDPATH**/ ?>