@php
$type = $type ?? 'text';
$labelStyle = $labelStyle ?? "vertical";
$classLabel =""
@endphp
@if($labelStyle == "horizontal")
@php $classLabel ="white-space: nowrap; margin-right:39px; margin-bottom: 0px; margin-top: 0px;vertical-align:middle;" @endphp
@if(!empty($label ?? ''))
@endif
@if($type == "select")
@else
filter(
function ($value, $key) {
if ($key == 'id') return false;
if ($key == 'name') return false;
if ($key == 'label') return false;
if ($key == 'class') return false;
if ($key == 'type') return false;
if ($key == 'placeholder') return false;
if ($key == 'value') return false;
if ($key == 'labelstyle') return false;
else return true;
}) !!} value="{{old($name) ?? $value ?? ''}}"
{{isset($checked) ? 'checked' : ''}} type="{{$type ?? 'text'}}"
class="form-control form-control-sm {{$class ?? ''}} @error($name) is-invalid @enderror"
placeholder="{{$placeholder ?? ''}}" name="{{$name}}" id="{{$id}}">
@endif
@else
@if(!empty($label ?? ''))