export interface BaseDecafMenuItem { label: any; icon?: React.ReactNode; children?: DecafMenuItem[]; } export type DecafMenuItem = BaseDecafMenuItem & ({ to?: string; } | { href?: string; }); interface BaseUserProfileDropdownItem { /** Stable key for the menu item. Must be unique among consumer items and must not collide with reserved keys: `me`, `settings`, `about`, `maestro`, `divider-1`, `logout`, `logout-all`. */ key: string; /** Item label. */ label: React.ReactNode; /** Optional leading icon. */ icon?: React.ReactNode; /** Disable the item. */ disabled?: boolean; /** Render as a danger (destructive) item. */ danger?: boolean; } /** * A divider entry between dropdown items. */ export interface UserProfileDropdownDividerItem { key: string; type: 'divider'; dashed?: boolean; } /** * A clickable item in the user profile dropdown. * * Exactly one of `to`, `href`, or `onClick` should be provided: * - `to`: navigate to an internal route via react-router. * - `href`: navigate to a URL. Same-origin paths (e.g. `/webapps/foo/production/`) * trigger a full-page navigation in the same tab; cross-origin URLs open in * a new tab with `noopener,noreferrer`. If you specifically want a new tab * for a same-origin URL, use `onClick` and call `window.open` yourself. * - `onClick`: arbitrary handler. */ export type UserProfileDropdownActionItem = BaseUserProfileDropdownItem & ({ to: string; href?: never; onClick?: never; } | { href: string; to?: never; onClick?: never; } | { onClick: () => void; to?: never; href?: never; }); export type UserProfileDropdownItem = UserProfileDropdownActionItem | UserProfileDropdownDividerItem; export {}; //# sourceMappingURL=types.d.ts.map