{{-- The settings partial EVERY ConfigurableAdapter uses.
Iterates the adapter's settingsSchema() and renders each
declared field as either plain text or a password (with show/hide
toggle) based on its `secret` flag. Everything ELSE on the form
(URL, active toggle, heartbeat toggle, per-field mapping) lives in
the shared form-shell component.
Field names AND ids are prefixed with the instance slug so each
adapter's form has fully unique DOM identifiers to avoid
entered values to visually propagate across tabs. --}}
@php
$slug = $adapter->name();
$locked = config('app.lock_passwords') === true;
@endphp
{{ trans('admin/settings/sync_adapters.experimental_banner_body') }}
@if ($adapter->supportsGroupScoping() && $adapter->isEnabled())
{{-- Refresh-groups action lives outside the config form because
it POSTs to a different route (settings.adapters.refresh_groups)
and HTML disallows nested form elements. Rendering it above
the config form makes it visually close to the mapping table
it populates. --}}
@endif
@if ($adapter->supportsVendorCustomFields() && $adapter->isEnabled())
{{-- Parallel to the refresh-groups action: pulls the vendor's
current custom-field list so extraFields() can offer each as
a mappable target. Same outside-the-config-form rationale. --}}
@endif
@php
$settingsSections = $adapter->settingsSections();
// Track section transitions across the loop so we can open
// and close
@endif
@if ($section !== null && isset($settingsSections[$section]))
@php
// Hoist the section-help lookup out of the Blade attribute
// to sidestep an operator-precedence trap: inside a
// `help_text="{!! ... !!}"` string attribute Blade compiles
// the `??` fallback as `'' . $arr['help'] ?? ''`, and the
// outer concat binds tighter than `??`, so PHP evaluates
// $arr['help'] unconditionally and warns on missing keys.
// Regular PHP `??` on its own line does the right thing.
$sectionHelp = $settingsSections[$section]['help'] ?? '';
@endphp
@endif
{{-- JS handlers for [data-visible-when-field] conditional-visibility
and .js-adapter-url-prefix live-update live in
resources/assets/js/snipeit.js. Both are data-attribute driven
so nothing on this partial needs inline script anymore. --}}