@php $_tabbarLimit = 4; $_tabItems = navbar()->topLevel($_tabbarLimit); $_overflowItems = navbar()->overflow($_tabbarLimit); $_hasOverflow = count($_overflowItems) > 0; $_socials = footer()->socials()->all(); $_availableLangs = (array) config('lang.available', []); $_hasLangs = count($_availableLangs) > 1; $_hasThemeSwitch = (bool) config('app.change_theme', true); $_authEnabled = (bool) config('app.auth_enabled', true); $_onlyModal = (bool) config('auth.only_modal'); $_onlySocial = (bool) config('auth.only_social', false); $_singleSocial = $_onlySocial && sizeof(social()->getAll()) === 1; $_singleSocialKey = $_singleSocial ? key(social()->toDisplay()) : null; $_isMaintenance = (bool) config('app.maintenance_mode'); $_showAuth = $_authEnabled && !user()->isLoggedIn(); $_hasMoreSecondary = $_hasOverflow || $_hasLangs || $_hasThemeSwitch || !empty($_socials) || $_showAuth; $_renderTabbar = count($_tabItems) > 0 || $_hasMoreSecondary; @endphp @if ($_renderTabbar) @if ($_hasMoreSecondary) @push('footer')
@if ($_showAuth)
@if ($_singleSocial) @t('auth.social.auth_via', [':social' => $_singleSocialKey]) @elseif ($_onlyModal) @if (!$_isMaintenance) @endif @else {{ __('def.login') }} @if (!$_isMaintenance) {{ __('def.register') }} @endif @endif
@endif @if ($_hasOverflow)

{{ __('def.menu') }}

@endif @if ($_hasLangs || $_hasThemeSwitch)

{{ __('def.preferences') }}

@if ($_hasThemeSwitch) @endif @if ($_hasLangs)
{{ __('def.language') }}
@foreach ($_availableLangs as $lang) {{ __('langs.' . $lang) }} {{ strtoupper($lang) }} @endforeach
@endif
@endif @if (!empty($_socials))

{{ __('def.socials') }}

@foreach ($_socials as $social) @endforeach
@endif
@endpush @endif @endif