{{-- multipart because this tab carries file uploads; the others are PUT forms. --}}
@csrf

{{ __('settings::messages.branding.heading') }}

{{-- What is currently in use, shown before the control that replaces it — an upload field alone gives no way to tell whether anything is set. --}}
@if ($logoUrl) {{ __('settings::messages.branding.logo') }} @else {{ __('settings::messages.branding.none_uploaded') }} @endif @if ($logoUrl && $canUpdate)
@endif
{{ __('settings::messages.branding.logo_help') }} @error('logo')
{{ $message }}
@enderror
@if ($faviconUrl) {{ __('settings::messages.branding.favicon') }} @else {{ __('settings::messages.branding.none_uploaded') }} @endif @if ($faviconUrl && $canUpdate)
@endif
{{ __('settings::messages.branding.favicon_help') }} @error('favicon')
{{ $message }}
@enderror

{{ __('settings::messages.branding.appearance') }}

@php($default = \App\Support\Branding\BrandingPalette::DEFAULT) @php($colour = old('primary_colour', $settings->get('branding.primary_colour') ?: $default))
{{ $colour }} {{-- Its own submit, so it needs no script and cannot be confused with saving a colour. A clinic that has already gone back to the shipped violet is not offered a button that would do nothing. --}} @if ($canUpdate && strtolower($colour) !== $default) @endif
{{ __('settings::messages.branding.primary_colour_help') }} @error('primary_colour')
{{ $message }}
@enderror
{{ __('settings::messages.branding.login_message_help') }} @error('login_message')
{{ $message }}
@enderror
{{-- The letterhead. Clinics have this artwork designed rather than assembled from fields — a band across the top of the sheet and one across the bottom — and hand it over as an image. Used on printed documents only: it is the paper, not the application. --}}

{{ __('settings::messages.branding.letterhead') }}

{{ __('settings::messages.branding.letterhead_help') }}

@foreach ([ ['print_header', $printHeaderUrl, 'print_header_label', 'print_header_help'], ['print_footer', $printFooterUrl, 'print_footer_label', 'print_footer_help'], ] as [$field, $current, $labelKey, $helpKey])
{{-- What is in use, before the control that replaces it. --}}
@if ($current) {{ __('settings::messages.branding.'.$labelKey) }} @else {{ __('settings::messages.branding.none_uploaded') }} @endif @if ($current && $canUpdate)
@endif
{{ __('settings::messages.branding.'.$helpKey) }} @error($field)
{{ $message }}
@enderror
@endforeach
@if ($canUpdate)
@endif