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

$__newAttributes = [];
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames(([
    'name',
    'label',
    'type' => 'text',
    'placeholder' => '',
    'value' => null,
    'required' => false,
    'icon' => null,
    'floating' => true,
    'options' => [],
    'hint' => null,
    'error' => 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',
    'type' => 'text',
    'placeholder' => '',
    'value' => null,
    'required' => false,
    'icon' => null,
    'floating' => true,
    'options' => [],
    'hint' => null,
    'error' => 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); ?>

<div class="relative">
    <?php if($floating): ?>
        <div class="relative">
            <?php if($icon): ?>
                <i data-lucide="<?php echo e($icon); ?>" class="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400 z-10"></i>
            <?php endif; ?>
            <?php if($type === 'select'): ?>
                <select name="<?php echo e($name); ?>" id="<?php echo e($name); ?>"
                    class="<?php echo \Illuminate\Support\Arr::toCssClasses([
                        'peer w-full rounded-xl border bg-white dark:bg-slate-900 text-sm text-slate-900 dark:text-white px-3.5 pt-5 pb-2 transition focus:ring-2 focus:ring-primary-500 focus:border-primary-500',
                        'pl-10' => $icon,
                        'border-slate-200 dark:border-slate-700' => !$error,
                        'border-red-400 ring-2 ring-red-100' => $error,
                    ]); ?>" <?php echo e($required ? 'required' : ''); ?>>
                    <option value=""><?php echo e($placeholder ?: 'Select...'); ?></option>
                    <?php $__currentLoopData = $options; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $val): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($key); ?>" <?php echo e($value == $key ? 'selected' : ''); ?>><?php echo e($val); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
            <?php elseif($type === 'textarea'): ?>
                <textarea name="<?php echo e($name); ?>" id="<?php echo e($name); ?>" rows="3" placeholder=" "
                    class="<?php echo \Illuminate\Support\Arr::toCssClasses([
                        'peer w-full rounded-xl border bg-white dark:bg-slate-900 text-sm text-slate-900 dark:text-white px-3.5 pt-5 pb-2 transition focus:ring-2 focus:ring-primary-500 focus:border-primary-500',
                        'pl-10' => $icon,
                        'border-slate-200 dark:border-slate-700' => !$error,
                        'border-red-400 ring-2 ring-red-100' => $error,
                    ]); ?>" <?php echo e($required ? 'required' : ''); ?>><?php echo e($value); ?></textarea>
            <?php else: ?>
                <input type="<?php echo e($type); ?>" name="<?php echo e($name); ?>" id="<?php echo e($name); ?>" placeholder=" "
                    value="<?php echo e($value); ?>"
                    class="<?php echo \Illuminate\Support\Arr::toCssClasses([
                        'peer w-full rounded-xl border bg-white dark:bg-slate-900 text-sm text-slate-900 dark:text-white px-3.5 pt-5 pb-2 transition focus:ring-2 focus:ring-primary-500 focus:border-primary-500',
                        'pl-10' => $icon,
                        'border-slate-200 dark:border-slate-700' => !$error,
                        'border-red-400 ring-2 ring-red-100' => $error,
                    ]); ?>" <?php echo e($required ? 'required' : ''); ?> />
            <?php endif; ?>
            <label for="<?php echo e($name); ?>"
                class="<?php echo \Illuminate\Support\Arr::toCssClasses([
                    'absolute left-3.5 top-3.5 text-sm text-slate-500 dark:text-slate-400 transition-all pointer-events-none origin-left',
                    'peer-focus:-translate-y-3 peer-focus:scale-75 peer-focus:text-primary-600',
                    'peer-[:not(:placeholder-shown)]:-translate-y-3 peer-[:not(:placeholder-shown)]:scale-75',
                    'pl-6' => $icon,
                ]); ?>">
                <?php echo e($label); ?> <?php if($required): ?><span class="text-red-500">*</span><?php endif; ?>
            </label>
        </div>
    <?php else: ?>
        <label for="<?php echo e($name); ?>" class="block text-xs font-semibold text-slate-700 dark:text-slate-300 mb-1.5">
            <?php echo e($label); ?> <?php if($required): ?><span class="text-red-500">*</span><?php endif; ?>
        </label>
        <?php if($type === 'select'): ?>
            <select name="<?php echo e($name); ?>" id="<?php echo e($name); ?>"
                class="w-full rounded-xl border border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-900 text-sm text-slate-900 dark:text-white px-3.5 py-2.5 focus:ring-2 focus:ring-primary-500 focus:border-primary-500">
                <?php $__currentLoopData = $options; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $val): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <option value="<?php echo e($key); ?>" <?php echo e($value == $key ? 'selected' : ''); ?>><?php echo e($val); ?></option>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </select>
        <?php else: ?>
            <input type="<?php echo e($type); ?>" name="<?php echo e($name); ?>" id="<?php echo e($name); ?>"
                value="<?php echo e($value); ?>" placeholder="<?php echo e($placeholder); ?>"
                class="w-full rounded-xl border border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-900 text-sm text-slate-900 dark:text-white px-3.5 py-2.5 focus:ring-2 focus:ring-primary-500 focus:border-primary-500" />
        <?php endif; ?>
    <?php endif; ?>

    <?php if($error): ?>
        <p class="mt-1.5 text-xs text-red-600 flex items-center gap-1">
            <i data-lucide="alert-circle" class="w-3 h-3"></i> <?php echo e($error); ?>

        </p>
    <?php elseif($hint): ?>
        <p class="mt-1.5 text-xs text-slate-500"><?php echo e($hint); ?></p>
    <?php endif; ?>
</div>
<?php /**PATH C:\Users\USER\Downloads\abc\resources\views/components/form-input.blade.php ENDPATH**/ ?>