{{--
Business Switcher Component
Shows the current business context and allows switching between businesses.
Note: Super admins use the topnav switcher instead.
Usage:
--}}
@auth
@php
$user = auth()->user();
@endphp
{{-- Super admins use the topnav switcher, so skip this component --}}
@if(!$user->isSuperAdmin())
@php
$currentBusiness = app(\App\Services\BusinessContext::class)->get();
$businesses = $user->getActiveBusinesses();
$hasMultiple = $businesses->count() > 1;
@endphp
@if($currentBusiness)
@if($hasMultiple)
{{-- Dropdown selector when multiple businesses --}}