[ 'menu' => 'portal-customer-sidebar', 'home' => action([Customer\DashboardController::class, 'index']), 'profile' => action([Customer\ProfileController::class, 'getProfile']), 'label' => __('portal::lang.customer_portal'), 'accent' => '#2563eb', 'accent_dark' => '#1d4ed8', ], 'supplier' => [ 'menu' => 'portal-supplier-sidebar', 'home' => action([Supplier\DashboardController::class, 'index']), 'profile' => action([Supplier\ProfileController::class, 'getProfile']), 'label' => __('portal::lang.supplier_portal'), 'accent' => '#059669', 'accent_dark' => '#047857', ], 'marketer' => [ 'menu' => 'portal-marketer-sidebar', 'home' => action([Marketer\DashboardController::class, 'index']), 'profile' => action([Marketer\ProfileController::class, 'getProfile']), 'label' => __('portal::lang.marketer_portal'), 'accent' => '#d97706', 'accent_dark' => '#b45309', ], ]; $cfg = $menus[$portalType] ?? $menus['customer']; return [ 'portal_type' => $portalType, 'portal_menu' => $cfg['menu'], 'portal_home' => $cfg['home'], 'portal_profile' => $cfg['profile'], 'portal_label' => $cfg['label'], 'portal_accent' => $cfg['accent'], 'portal_accent_dark' => $cfg['accent_dark'] ?? $cfg['accent'], ]; } public static function shareForType(string $portalType): void { View::share(self::forType($portalType)); } }