@props([ 'disabled' => false, 'title' => '', 'name' => $attributes->wire('model')->value() ?? '', 'id' => '', 'hint' => '', 'type' => 'text', 'placeholder' => '', 'isrequired' => false, 'mb' => 'mb-3', 'titleActionLabel' => '', 'titleActionClick' => '', 'titleActionClass' => '', ]) @php $isDateType = $type === 'date'; $inputClasses = 'kt-input '.($errors->has($name) ? 'border-danger ' : '').($isDateType ? 'kt-input-date' : ''); $titleActionClasses = trim('inline-flex !w-auto shrink-0 cursor-pointer items-center whitespace-nowrap border-0 bg-transparent p-0 text-[12px] leading-none font-semibold text-primary underline underline-offset-2 hover:text-primary/80 '.$titleActionClass); @endphp
@if(isset($title) && $title != '')
@if($titleActionLabel !== '') @endif
@endif
merge(['class' => $inputClasses]) !!} name="{{$name}}" id="{{$id ?: $name}}" value="{{old($name, isset($value) ? $value : null)}}" placeholder="{{$placeholder ?: $title}}" /> @if($isDateType) @endif {{ $slot ?? '' }}
@if($hint)
{{$hint}}
@endif @error($name)
{{ $message }}
@enderror