@php $type = $meta['type'] ?? 'string'; $isChild = $isChild ?? false; // Current value from bound state, fall back to config default $value = data_get($settingValues, $key); if ($value === null) { $value = $meta['default'] ?? ''; } $boolVal = filter_var($value, FILTER_VALIDATE_BOOLEAN) ? '1' : '0'; // Human readable label / description $label = $labels[$key] ?? ucwords(str_replace(['_', '-'], ' ', $key)); // A sub setting is disabled while its parent (has_sub_settings) setting is off. $parentKey = $meta['parent_setting'] ?? null; $disabled = $parentKey !== null && !filter_var(data_get($settingValues, $parentKey), FILTER_VALIDATE_BOOLEAN); @endphp @if ($type === 'bool') {{-- Bool: toggle at the start of the row, label after --}}
@if ($isChild) └ @endif
{{ $label }} {{ $key }}
@else {{-- Other types (select / numeric / text): label first, control at the end of the row --}}
@if ($isChild) └ @endif
{{ $label }} {{ $key }}
@switch($type) @case('select') @break @case('numeric') @break @default @endswitch
@endif