@props([ 'name' => 'phone', 'id' => null, 'value' => '', 'label' => 'Phone Number', 'placeholder' => 'Enter your phone number', 'required' => false, 'disabled' => false, 'readonly' => false, 'attributes' => [], 'class' => '', 'helpText' => '', 'preferredCountries' => ['ke', 'ug', 'tz', 'us'], 'onlyCountries' => [], 'excludeCountries' => [], 'initialCountry' => 'auto', 'separateDialCode' => true, 'showValidationIcon' => true, 'autoFormat' => true, 'nationalMode' => false, ]) @php $componentId = $id ?? $name . '-' . uniqid(); $hasError = $errors->has($name); $oldValue = old($name, $value); @endphp
@if($label) @endif
merge([ 'class' => 'block w-full text-sm transition-colors duration-200 border border-gray-300 ' . ($hasError ? 'border-red-500' : 'border-gray-300 dark:border-gray-600') . ' bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 ' . 'focus:outline-none focus:ring-2 focus:ring-primary-500/20 ' . ($disabled ? 'opacity-50 cursor-not-allowed' : '') . ($readonly ? 'bg-gray-50 dark:bg-gray-800' : '') . ' ' . $class ]) }} > @if($showValidationIcon) @endif
@if($helpText)

{{ $helpText }}

@endif
@once @push('scripts') @endpush @endonce @push('scripts') @endpush