@endif
@if ($fieldType === 'checkbox')
@elseif ($fieldType === 'category')
{{-- Per-record category selector. Empty means "fall back
to the instance-wide default_category_id". Uses the
same AJAX-backed select2 component as the shell's
default category picker. --}}
@elseif ($fieldType === 'field_map')
{{-- field_map entries are rendered by the shell's own
fieldset below the operational checkboxes, so they
sit alongside the standard mapping controls instead
of getting lost among the credential inputs. Nothing
to render here. --}}
@else
@if ($locked)
@elseif ($fieldType === 'select')
@elseif ($fieldType === 'multiselect')
@php
$selectedValues = old(
$fieldName,
is_string($storedValue) && $storedValue !== '' ? (json_decode($storedValue, true) ?: []) : []
);
// First-render fallback: when nothing is
// stored yet, adapters can declare a
// `default` array to seed the selection so
// admins see the intended baseline instead
// of an empty widget.
if (empty($selectedValues) && ! empty($field['default']) && is_array($field['default'])) {
$selectedValues = $field['default'];
}
@endphp
@elseif ($fieldType === 'textarea')
@elseif ($isSecret)
@elseif (! empty($field['url_prefix']))
{{-- Input-group that shows the current Base URL
as a prefix addon so admins see the full
URL that will be assembled at request
time. Marker class on the addon lets the
live-update JS at the bottom of this
partial sync new Base URL keystrokes into
this label without a page reload. --}}
{{ $adapter->getUrl() ?: trans('admin/settings/sync_adapters.custom_url_prefix_base_url_placeholder') }}
@else
@endif
@endif
@if (is_array($visibleWhen))
@endif
@endforeach
@if ($currentSection !== null)
{{-- Close the last section's fieldset when the schema loop exits inside one. --}}