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

$__newAttributes = [];
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['label', 'name', 'type' => 'text', 'span' => '4', 'placeholder' => '', 'required' => false]));

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((['label', 'name', 'type' => 'text', 'span' => '4', 'placeholder' => '', 'required' => false]), '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
    $placeholder = $placeholder ?: match (true) {
        str_contains($name, 'rut') => '12.345.678-9',
        $name === 'work_phone' => '+56 55 123 4567',
        str_contains($name, 'phone') => '+56 9 1234 5678',
        default => '',
    };
?>
<div class="col-md-<?php echo e($span); ?>"><label class="form-label" for="<?php echo e($name); ?>"><?php echo e($label); ?> <?php if($required): ?><span class="required">*</span><?php endif; ?></label><input id="<?php echo e($name); ?>" type="<?php echo e($type); ?>" class="form-control" :class="errors.<?php echo e($name); ?> && 'is-invalid'" x-model="form.<?php echo e($name); ?>" placeholder="<?php echo e($placeholder); ?>" @input="fieldChanged('<?php echo e($name); ?>')" <?php if(str_contains($name, 'rut')): ?> maxlength="12" inputmode="text" <?php endif; ?>><div class="field-error" x-text="errors.<?php echo e($name); ?>"></div></div>
<?php /**PATH C:\Users\bpere\OneDrive\Documentos\WebPrime\CCR\plataforma\resources\views/components/form-field.blade.php ENDPATH**/ ?>