@props(['name', 'label' => '', 'type', 'ishorizontal' => false, 'haslabel' => true])
<div
    class="flex {{ $ishorizontal ? 'flex-row items-center space-x-3' : 'flex-col items-start space-y-2' }} justify-start w-full">
    @if ($haslabel)
        <label for="{{ $name }}" class="block text-sm text-gray-500">{{ $label }}:</label>
    @endif
    <input type="{{ $type }}" name="{{ $name }}"
        class="bg-gray-50  text-gray-900 text-sm rounded-lg block w-full p-2.5" {{ $attributes }} />
    <div>
        @error($name)
            <span class="error-text">{{ $message }}</span>
        @enderror
    </div>
</div>
