@props([
'type' => 'text',
'label' => null,
'error' => null,
'hint' => null,
'icon' => null,
'iconPosition' => 'left'
])
@if($label)
@endif
@if($icon && $iconPosition === 'left')
@endif
merge([
'class' => 'w-full px-4 py-2.5 bg-white dark:bg-slate-800 border rounded-xl text-slate-800 dark:text-white placeholder-slate-400 focus:ring-2 focus:ring-indigo-500 focus:border-transparent transition-colors ' .
($error ? 'border-red-500 focus:ring-red-500' : 'border-slate-200 dark:border-slate-700') .
($icon && $iconPosition === 'left' ? ' pl-10' : '') .
($icon && $iconPosition === 'right' ? ' pr-10' : '')
]) }}
>
@if($icon && $iconPosition === 'right')
@endif
@if($error)
{{ $error }}
@elseif($hint)
{{ $hint }}
@endif