@props([ 'class' => '', 'compact' => true, ]) @php $routeName = Route::currentRouteName(); $baseParams = $routeName && Route::current() ? collect(Route::current()->parameters())->except('locale')->all() : []; $current = app()->getLocale(); $localeMeta = [ 'fa' => [ 'label' => 'فارسی', 'flag' => 'fa.svg', ], 'en' => [ 'label' => 'English', 'flag' => 'us.svg', ], 'de' => [ 'label' => 'Deutsch', 'flag' => 'de.svg', ], ]; $locales = collect(site_supported_locales()) ->mapWithKeys(fn ($code) => [$code => $localeMeta[$code] ?? ['label' => strtoupper($code), 'flag' => $code.'.svg']]) ->all(); @endphp @if ($routeName) @endif