import React from 'react'; import type { Menu, Section } from '../services/types.js'; import { type AsChildChildren } from '@wix/headless-utils/react'; export interface MenuRootProps { children: React.ReactNode; menu?: Menu; } export interface MenuNameProps { /** Whether to render as a child component */ asChild?: boolean; /** Custom render function when using asChild */ children?: AsChildChildren<{ name: string; }>; /** CSS classes to apply to the default element */ className?: string; } export interface MenuDescriptionProps { /** Whether to render as a child component */ asChild?: boolean; /** Custom render function when using asChild */ children?: AsChildChildren<{ description: string; }>; /** CSS classes to apply to the default element */ className?: string; } export interface MenuSectionsProps { children: (props: { sections: Section[]; }) => React.ReactNode; } export interface MenuSectionsRepeaterProps { children: React.ReactNode; } /** * Root component that provides menu context to its children. * * @warning Do not use this component directly if it's inside a repeater. * Use the repeater component (e.g., Menus.MenusRepeater) instead, which will * automatically render this Root component for each menu. */ export declare function Root(props: MenuRootProps): import("react/jsx-runtime").JSX.Element | null; /** * Displays the menu name with customizable rendering following the documented API. * * @component * @example * ```tsx * // Default usage * * * // asChild with primitive * *

* * * // asChild with react component * * {React.forwardRef(({name, ...props}, ref) => ( *

* {name} *

* ))} *
* ``` */ export declare const Name: React.ForwardRefExoticComponent>; /** * Displays the menu description with customizable rendering following the documented API. * * @component * @example * ```tsx * // Default usage * * * // asChild with primitive * *

* * * // asChild with react component * * {React.forwardRef(({description, ...props}, ref) => ( *

* {description} *

* ))} *
* ``` */ export declare const Description: React.ForwardRefExoticComponent>; export declare const SectionsRepeater: React.ForwardRefExoticComponent>; /** * Menu namespace containing all menu components * following the compound component pattern: MenuComponent.Root, MenuComponent.Name, MenuComponent.Description, etc. */ export declare const MenuComponent: { /** Menu root component */ readonly Root: typeof Root; /** Menu name component */ readonly Name: React.ForwardRefExoticComponent>; /** Menu description component */ readonly Description: React.ForwardRefExoticComponent>; /** Menu sections repeater component */ readonly SectionsRepeater: React.ForwardRefExoticComponent>; };