import type { ReactElement } from 'react' import type { Link } from './links' /** * A single item in a menu, optionally containing nested sub-items. */ export type MenuItem = { /** A unique identifier for the menu item. */ id: string /** The display label shown to the user. */ label: string /** The navigation link for this menu item. */ link?: Link /** An optional container element rendered alongside the menu item. */ container?: ReactElement /** Nested child menu items, for building multi-level menus. */ items?: Array } /** * A list of menu items. * * @example * ```tsx * import type { MenuItems } from '@wix/editor-react-types'; * * interface MyComponentProps { * items?: MenuItems; * } * ``` */ export type MenuItems = Array