@php
$isPrimary = $field->primary == '1';
$currentValue = old($field->field, $list?->{$field->field} ?? $field->default);
$searchDisplay = old('display_' . $field->field, $field->selected_label ?: $list?->{$field->field} ?? '');
$isCustomSelect = \Illuminate\Support\Str::contains($field->class, 'custom-select');
$isSelectMultiple = \Illuminate\Support\Str::contains($field->class, 'select-multiple');
@endphp
@if ($field->type === 'text')
@elseif ($field->type === 'enum')
@if ($isCustomSelect || $isSelectMultiple)
@endif
@if ($isPrimary)
@endif
@elseif ($field->type === 'search')
@else
type === 'currency' ? 'step=' . ('0.' . str_repeat('0', max((int) $field->decimals - 1, 0)) . '1') : '' }}>
@endif
@error($field->field)
{{ $message }}
@enderror