import { FC } from 'react'; import { UniformSlot } from '@uniformdev/next-app-router/component'; import Grid from '@/components/ui/Grid'; import GridItem from '@/components/ui/GridItem'; import { resolveColor } from '@/utils/colorPalette'; import { cn, resolveViewPort } from '@/utils/styling'; import { MegaMenuDesktopContent } from './mega-menu'; import { MegaMenuMasterDetailDesktopContent } from './mega-menu-master-detail'; import { NavigationFlyoutVariants } from './types'; import type { MegaMenuCategory, NavigationFlyoutParameters, NavigationFlyoutProps } from './types'; type NavigationFlyoutPropsDesktopContentProps = Pick & Pick & { isOpen: boolean; hasRightContent: boolean; variant?: string; onClose: () => void; onPanelMouseEnter: () => void; onPanelMouseLeave: () => void; menuId: string; anchorBottom: number; categories: MegaMenuCategory[]; activeCategoryId: string; onCategoryHover: (id: string) => void; }; export const NavigationFlyoutPropsDesktopContent: FC = ({ isOpen, backgroundColor, slots, border, hasRightContent, variant, onClose, onPanelMouseEnter, onPanelMouseLeave, menuId, anchorBottom, categories, activeCategoryId, onCategoryHover, }) => { if (variant === NavigationFlyoutVariants.MegaMenu) { const sharedProps = { isOpen, backgroundColor, slots, border, onClose, onPanelMouseEnter, onPanelMouseLeave, menuId, anchorBottom, }; if (categories.length > 0) { return ( ); } return ; } const bg = resolveColor(backgroundColor, 'background'); return (
); };