import { apiGet, apiPost } from "@/app/lib/clientApi"; import type { MenuHandle, MenuItem, MenuView } from "@/app/lib/menus"; // Client calls for the Menus page (add-storefront-menus): only the portal's own /api/menus/** route. export function getMenu(handle: MenuHandle): Promise { return apiGet(`/api/menus/${encodeURIComponent(handle)}`); } export function saveMenu(handle: MenuHandle, body: { items: MenuItem[] }): Promise { return apiPost(`/api/menus/${encodeURIComponent(handle)}`, body); }