@php // Decorative, local SVGs. Match the authored URL/title before translation; // unknown/custom CMS entries still receive a consistent neutral page icon. $cpIconSubject = strtolower((string) parse_url((string) ($menuUrl ?? ''), PHP_URL_PATH).' '.(string) parse_url((string) ($menuUrl ?? ''), PHP_URL_FRAGMENT).' '.(string) ($menuTitle ?? '')); $cpIconKey = 'page'; $cpIconRules = [ 'support' => ['complaint', 'contact', 'support', 'helpdesk'], 'shield' => ['privacy', 'gdpr', 'aml', 'security', 'regulation'], 'question' => ['faq', 'frequently', 'questions'], 'alert' => ['risk', 'disclosure'], 'building' => ['about', 'company'], 'people' => ['staff', 'team'], 'book' => ['education', 'knowledge', 'webinar', 'resources', 'library'], 'exchange' => ['forex', 'currencies', 'currency'], 'diamond' => ['metal', 'commodit', 'gold'], 'chart' => ['market', 'indices', 'shares', 'stocks', 'analysis'], 'grid' => ['portal', 'dashboard'], 'wallet' => ['account', 'funding', 'deposit', 'withdraw'], 'monitor' => ['platform', 'terminal', 'mt4'], 'document' => ['terms', 'policy', 'legal', 'conditions'], ]; foreach ($cpIconRules as $cpIconCandidate => $cpIconTerms) { foreach ($cpIconTerms as $cpIconTerm) { if (str_contains($cpIconSubject, $cpIconTerm)) { $cpIconKey = $cpIconCandidate; break 2; } } } $cpIconPaths = [ 'page' => ['M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z', 'M14 3v6h6M8 13h8M8 17h5'], 'document' => ['M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z', 'M14 3v6h6M8 13h8M8 17h8'], 'building' => ['M4 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16M16 10h3a1 1 0 0 1 1 1v10M2 21h20', 'M8 7h1m3 0h1M8 11h1m3 0h1M8 15h1m3 0h1M9 21v-3h3v3'], 'support' => ['M4 13v-2a8 8 0 0 1 16 0v2', 'M4 12H3a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h3v-6zm16 0h1a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-3v-6z', 'M19 18v1a2 2 0 0 1-2 2h-4m-2-1h2v2h-2z'], 'shield' => ['m12 3 8 3v5c0 5-3.5 8.2-8 10-4.5-1.8-8-5-8-10V6z', 'm8.5 12 2.5 2.5 4.5-5'], 'question' => ['M22 12a10 10 0 1 1-20 0 10 10 0 0 1 20 0', 'M9.2 8.5a3 3 0 0 1 5.8 1c0 2-3 2-3 4m0 3.5h.01'], 'alert' => ['m10.3 4.2-8 14a1.9 1.9 0 0 0 1.7 2.8h16a1.9 1.9 0 0 0 1.7-2.8l-8-14a1.9 1.9 0 0 0-3.4 0', 'M12 9v4m0 4h.01'], 'people' => ['M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2M22 21v-2a4 4 0 0 0-3-3.9', 'M13 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0M17 3.1a4 4 0 0 1 0 7.8'], 'book' => ['M12 6C9 3 5 3 2 4v15c3-1 7-1 10 2 3-3 7-3 10-2V4c-3-1-7-1-10 2z', 'M12 6v15M5 8h3m-3 4h3m8-4h3m-3 4h3'], 'exchange' => ['M4 7h16m-4-4 4 4-4 4M20 17H4m4-4-4 4 4 4'], 'diamond' => ['m3 8 4-5h10l4 5-9 13zM3 8h18M7 3l5 18 5-18'], 'chart' => ['M3 3v18h18M7 16v-4m5 4V9m5 7V5', 'm7 8 4-4 4 2 5-4'], 'grid' => ['M3 3h7v7H3zM14 3h7v7h-7zM3 14h7v7H3zM14 14h7v7h-7z'], 'wallet' => ['M20 8V5H5a3 3 0 0 0 0 6h15v9H5a3 3 0 0 1-3-3V8', 'M20 13h-4v4h4m-2-2h.01'], 'monitor' => ['M4 3h16a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1M8 21h8m-4-4v4', 'm7 12 3-3 3 2 4-5'], ]; @endphp