@props(['variant' => 'light']) @php $locales = [ 'bg' => ['label' => __('app.lang.bg'), 'short' => 'BG', 'flag' => 'bg'], 'en' => ['label' => __('app.lang.en'), 'short' => 'EN', 'flag' => 'gb'], 'ro' => ['label' => __('app.lang.ro'), 'short' => 'RO', 'flag' => 'ro'], ]; $current = app()->getLocale(); $currentData = $locales[$current] ?? $locales['bg']; $flags = [ // Bulgaria — white / green / red 'bg' => '', // Romania — blue / yellow / red 'ro' => '', // United Kingdom — simplified union flag 'gb' => '', ]; $isDark = $variant === 'dark'; $trigger = $isDark ? 'border-white/15 bg-white/10 text-white hover:border-white/35 hover:bg-white/15' : 'border-[#E5E7EB] bg-white text-[#0B0B0B] hover:border-[#F58229]'; @endphp {!! $flags[$currentData['flag']] !!} {{ $currentData['label'] }} {{ $currentData['short'] }} @foreach ($locales as $code => $data) {!! $flags[$data['flag']] !!} {{ $data['label'] }} @if ($code === $current) @endif @endforeach @once @push('scripts')@endpush @endonce