// Renders the assembled getFullMenu() tree: menus → sections → item cards, with the empty state. // This is the menu render surface's body (the Menu page is a thin wrapper). Ordered already by // the helper (sectionIds / itemIds). Styled with base44 design tokens (shadcn Tailwind classes). Each // card's onOpen gets the item plus the menuId/sectionId it was shown under — ordering needs both. import MenuItemCard from "./MenuItemCard"; function imageUrl(img) { const url = img?.url; return url ? (url.startsWith("//") ? `https:${url}` : url) : null; } export default function MenuList({ menus, onOpenItem, empty = "No menu yet — add one from your Wix dashboard." }) { if (!menus?.length) { return

{empty}

; } return (
{menus.map((menu) => (

{menu.name}

{menu.description && (

{menu.description}

)} {menu.sections.map((section) => (

{section.name}

{imageUrl(section.image) && ( {section.name} )}
{section.items.map((item) => ( onOpenItem?.(item, { menuId: menu.id, sectionId: section.id })} /> ))}
))}
))}
); }