'use client'; import { FC, Suspense } from "react"; import { MenuProps } from "@/validations/mutual/dashboard/props"; import UserProfileSection from "./userProfileSection"; import ClientSelectionSection from "./clientSelectionSection"; import MenuItemsSection from "./menuItemsSection"; import MenuLoadingState from "./menuLoadingState"; import MenuErrorState from "./menuErrorState"; import MenuEmptyState from "./menuEmptyState"; import LoadingContent from "@/components/mutual/loader/component"; const MenuComponent: FC = ({ lang, activePageUrl, useReloadWindow, availableApplications, onlineData, onlineLoading, onlineError, userData, userLoading, userError, selectionData, selectionLoading, selectionError, menuData, menuLoading, menuError }) => { if (menuLoading) { return } // Render loading state if (menuError) { return ; } // Render error state if (availableApplications.length === 0) { return ; } // Render empty state function handleClientSelection(client: any) { console.log('Client selected:', client) } return (
{/* User Profile Section */}
}> {/* Client Selection Section */}
}> {/* Menu Items Section */} }> ); }; export default MenuComponent;