@php
$legalBrand = trim((string) cms('branding.site_name', config('app.name', 'Trading Platform')));
$legalEntity = trim((string) cms('legal.company_name', $legalBrand));
$legalEmail = trim((string) site_contact('support_email'));
$legalPhone = trim((string) site_contact('phone'));
$legalPhoneHref = preg_replace('/[^+\d]/', '', $legalPhone) ?: site_contact('phone_href');
$legalAddress = trim((string) cms('legal.registered_address', site_contact('address')));
$legalKey = (string) data_get($legalPage, 'key', 'legal');
$legalTitle = (string) data_get($legalPage, 'title', 'Legal Information');
$legalSummary = (string) data_get($legalPage, 'summary', 'Important information about the website and related services.');
$legalUpdated = (string) data_get($legalPage, 'updated', '4 September 2026');
$legalVersion = (string) data_get($legalPage, 'version', '1.0');
$legalSections = collect((array) data_get($legalPage, 'sections', []))->values();
$legalHasSupplement = isset($page) && filled($page?->html_content);
$legalContactNumber = $legalSections->count() + ($legalHasSupplement ? 2 : 1);
$legalHighlights = collect((array) data_get($legalPage, 'highlights', []));
$legalCssVersion = @filemtime(public_path('themes/supplied/fxzone/assets/css/fxzone-legal.css')) ?: '20260904';
$legalJsVersion = @filemtime(public_path('themes/supplied/fxzone/assets/js/fxzone-legal.js')) ?: '20260904';
$legalRoutes = [
['key' => 'terms', 'label' => 'Terms', 'route' => 'page.terms', 'icon' => 'fa-file-text'],
['key' => 'privacy', 'label' => 'Privacy', 'route' => 'page.privacy', 'icon' => 'fa-user-secret'],
['key' => 'aml', 'label' => 'AML', 'route' => 'page.aml', 'icon' => 'fa-shield'],
['key' => 'gdpr', 'label' => 'GDPR', 'route' => 'page.gdpr', 'icon' => 'fa-lock'],
['key' => 'cookies', 'label' => 'Cookies', 'route' => 'page.cookies', 'icon' => 'fa-sliders'],
['key' => 'risk', 'label' => 'Risk', 'route' => 'page.risk', 'icon' => 'fa-exclamation-triangle'],
];
@endphp
{{ $legalTitle }} | {{ $legalBrand }}
@include('shared.favicon', ['faviconFallback' => theme_asset('assets/images/favicon-2.ico', 'fxzone')])
@include('themes.includes.runtime-customization')
@include('themes.fxzone.partials.site-header')
{{ \App\Support\FxzoneIcons::html(data_get($legalPage, 'icon', 'fa-balance-scale')) }}{{ data_get($legalPage, 'eyebrow', 'Legal & Compliance') }}
{{ $legalTitle }}
{{ $legalSummary }}
{{ \App\Support\FxzoneIcons::html('fa-calendar-o') }}Updated {{ $legalUpdated }}
{{ \App\Support\FxzoneIcons::html('fa-code-fork') }}Version {{ $legalVersion }}
{{ \App\Support\FxzoneIcons::html('fa-desktop') }}Website & client area
{{ \App\Support\FxzoneIcons::html(data_get($legalPage, 'icon', 'fa-balance-scale')) }}
Document owner
{{ $legalEntity }}
Address {{ $legalAddress }}
Status Published
@if($legalHighlights->isNotEmpty())
@foreach($legalHighlights as $highlight)
{{ \App\Support\FxzoneIcons::html(data_get($highlight, 'icon', 'fa-check')) }}
{{ data_get($highlight, 'title') }} {{ data_get($highlight, 'text') }}
@endforeach
@endif
@if(data_get($legalPage, 'notice'))
{{ \App\Support\FxzoneIcons::html(data_get($legalPage, 'notice.icon', 'fa-info-circle')) }}
{{ data_get($legalPage, 'notice.title', 'Important') }} {{ data_get($legalPage, 'notice.text') }}
@endif
@foreach($legalSections as $index => $section)
@php $sectionId = data_get($section, 'id', 'section-'.($index + 1)); @endphp
{{ str_pad((string) ($index + 1), 2, '0', STR_PAD_LEFT) }}
@if(data_get($section, 'kicker')){{ data_get($section, 'kicker') }} @endif
{{ data_get($section, 'title') }}
@foreach((array) data_get($section, 'paragraphs', []) as $paragraph)
{{ $paragraph }}
@endforeach
@if(data_get($section, 'bullets'))
@foreach((array) data_get($section, 'bullets') as $bullet)
{{ \App\Support\FxzoneIcons::html('fa-check') }}{{ $bullet }}
@endforeach
@endif
@if(data_get($section, 'numbered'))
@foreach((array) data_get($section, 'numbered') as $numberedItem)
{{ $loop->iteration }} {{ $numberedItem }}
@endforeach
@endif
@if(data_get($section, 'definitions'))
@foreach((array) data_get($section, 'definitions') as $definition)
{{ data_get($definition, 'term') }} {{ data_get($definition, 'description') }}
@endforeach
@endif
@if(data_get($section, 'table'))
@foreach((array) data_get($section, 'table.headers', []) as $header){{ $header }} @endforeach
@foreach((array) data_get($section, 'table.rows', []) as $row)
@foreach((array) $row as $cell){{ $cell }} @endforeach
@endforeach
@endif
@foreach((array) data_get($section, 'subsections', []) as $subsection)
{{ data_get($subsection, 'title') }}
@foreach((array) data_get($subsection, 'paragraphs', []) as $paragraph)
{{ $paragraph }}
@endforeach
@if(data_get($subsection, 'bullets'))
@foreach((array) data_get($subsection, 'bullets') as $bullet)
{{ \App\Support\FxzoneIcons::html('fa-angle-right') }}{{ $bullet }}
@endforeach
@endif
@endforeach
@if(data_get($section, 'callout'))
{{ \App\Support\FxzoneIcons::html(data_get($section, 'callout.icon', 'fa-info-circle')) }}
{{ data_get($section, 'callout.title') }} {{ data_get($section, 'callout.text') }}
@endif
@endforeach
@if($legalHasSupplement)
{{ str_pad((string) ($legalSections->count() + 1), 2, '0', STR_PAD_LEFT) }}
Administrator content
Operator-specific supplement
{!! $page->html_content !!}
@endif
@include('themes.fxzone.partials.site-footer')
@include('themes.includes.runtime-body-end')