@extends('layouts.dashboard') @section('content') @php /* The gallery is one JSON list now — posted as footer_gallery_keep[] / footer_gallery_new[] and stored under a single key. The numbered footer_gallery_1..N settings it replaced are no longer written by anything, so the "is this slot custom?" test that read them could only ever answer no; it and the defaults it needed are gone with them. Each image carries its own X instead. */ // One section-visibility toggle (Bootstrap form-switch, re-skinned by app.css). $sw = static function (string $name, string $label, string $help = '', string $default = '1'): void { $on = setting($name, $default) === '1'; @endphp
@php }; @endphp
@csrf

{{ t_raw('admin.footer.visibility_heading') }}

@php $sw('footer_enabled', t_raw('admin.footer.sw_enabled_label')); @endphp
@php $sw('footer_benefits_enabled', t_raw('admin.footer.sw_benefits_label'), t_raw('admin.footer.sw_benefits_help')); @endphp @php $sw('footer_gallery_enabled', t_raw('admin.footer.sw_gallery_label'), t_raw('admin.footer.sw_gallery_help')); @endphp @php $sw('footer_columns_enabled', t_raw('admin.footer.sw_columns_label'), t_raw('admin.footer.sw_columns_help')); @endphp @php $sw('footer_bottom_enabled', t_raw('admin.footer.sw_bottom_label'), t_raw('admin.footer.sw_bottom_help')); @endphp

{{ t_raw('admin.footer.content_heading') }}

@php /* No placeholder and no hint on either field: both promised a fallback that no longer exists. What is typed here is what the footer prints, and blank means the footer prints nothing. */ @endphp
@php /* The app badges print in this same footer, so their store addresses live with its content (moved from Settings). */ @endphp

{{ t_raw('admin.settings.sec_mobile_apps') }}

@php /* Was five fixed fields, one per network — so an operator could not add Instagram and could not drop a network they do not use. Now a repeatable row: the network chosen on the left, its address beside it, built from App\Services\SocialNetwork. Add and Remove follow the delivery-tier pattern — Add in the head, Remove right-aligned on the row. */ @endphp @php $socRows = \App\Services\SocialNetwork::forAdmin(); @endphp

{{ t_raw('admin.footer.social_heading') }}

{{ t_raw('admin.footer.social_help') }}

@foreach ($socRows as $si => $sRow) @php /* One row: the network as a GLYPH picker — the same .qm-iconpick dropdown the navigation screen uses, so the choice is made by recognising the logo rather than reading a list of names — then the address, then an inline delete on the same line, the .qm-icon-btn danger used by every other row in the product. */ @endphp
@partial('pc-icon-field', [ 'name' => 'social[' . (int) $si . '][network]', 'value' => $sRow['network'], 'label' => t_raw('admin.footer.social_network_label'), 'allowNone' => false, ])
@php /* .qm-of-actions is the product's existing slot for a row action inside a filter-bar row — the navigation screen removes a link with exactly this markup. It handles the alignment against a 48px field, which a bare flex wrapper did not. */ @endphp
@endforeach
@php /* Under the list, where the next row appears — and RIGHT-aligned, like every other Add/Create/Save in the product. */ @endphp
@php /* The trust strip. Six rows built exactly like the social rows above — .qm-order-filters with .qm-of-field cells — so each item's icon and its label sit on ONE line, which is how the band itself reads. Same glyph dropdown as the social picker. */ @endphp

{{ t_raw('admin.footer.strip_heading') }}

@foreach ($strip as $row)
@partial('pc-icon-field', [ 'name' => 'strip[' . $row['icon']['key'] . ']', 'value' => $row['icon']['value'], 'id' => 'fb-' . (int) $row['n'] . '-i', 'label' => t_raw('admin.footer.strip_icon', [':n' => (string) $row['n']]), ])
@endforeach
@php /* The gallery is a MARQUEE in the footer - order is the thing being edited, so the card is a sorting surface: compact thumbnails that drag (or arrow-key) into order, a live strip preview of exactly what visitors get, a count, and Add up in the head so it is reachable without scrolling past the images. Kept paths still post as footer_gallery_keep[] in DOM order; the shared media field below collects new picks. */ @endphp

{{ t_raw('admin.footer.gallery_heading') }} {{ str_replace(':count', (string) count(array_filter($gallery ?? [])), t_raw('admin.footer.gallery_count')) }}

{{ t_raw('admin.footer.gallery_empty') }}

@endsection