@php
  $typeId = Auth::guard('admin')->user()->type_id;

  $allTabs = [
    ['label' => 'Shop Profile', 'route' => 'shop.profile.edit', 'match' => 'shop.profile.*', 'roles' => [2]],
    ['label' => 'Staff', 'route' => 'shop.staff.index', 'match' => 'shop.staff.*', 'roles' => [2]],
    ['label' => 'Staff Roles', 'route' => 'shop.roles.index', 'match' => 'shop.roles.*', 'roles' => [2]],
    ['label' => 'Garments', 'route' => 'shop.garments.index', 'match' => 'shop.garments.*', 'roles' => [2]],
    ['label' => 'Age Types', 'route' => 'shop.ageTypes.index', 'match' => 'shop.ageTypes.*', 'roles' => [2, 3]],
    ['label' => 'Customers', 'route' => 'customers.index', 'match' => 'customers.*', 'roles' => [2, 3]],
    ['label' => 'Addons', 'route' => 'shop.addons.index', 'match' => 'shop.addons.*', 'roles' => [2]],
    ['label' => 'Settings', 'route' => 'settings.prices.index', 'match' => 'settings.*', 'roles' => [2, 3]],

  ];

  $tabs = collect($allTabs)->filter(fn($t) => in_array($typeId, $t['roles']));
@endphp

<div class="flex flex-wrap gap-2 mb-6 pb-1" style="border-bottom:1px solid #eee6d8;">
  @foreach($tabs as $tab)
    @if(Route::has($tab['route']))
      <a href="{{ route($tab['route']) }}"
         class="text-sm px-4 py-2 rounded-t-lg font-medium"
         style="{{ request()->routeIs($tab['match']) ? 'background:#C2185B; color:white;' : 'background:#f2ece0; color:#6b6470;' }}">
        {{ $tab['label'] }}
      </a>
    @endif
  @endforeach
</div>
