/** A single entry in the app menu's right hand pane or in the user menu. */ export type AppMenuLink = { label: string; /** * Stable identifier for the entry. Set for app entries (the version-less * ArticleId), and used as the key when toggling the favorite state. */ id?: string; /** * Current favorite state. A favorite toggle is only rendered for entries * where this is a boolean and the menu got an `onToggleFavorite` handler. */ isFavorite?: boolean; /** Renders an anchor. Without an href the entry is rendered as a button. */ href?: string; target?: string; rel?: string; onClick?: () => void; /** Extra attributes, e.g. `{ "data-action": "clear-cache" }` for site scripts. */ attributes?: Record; /** Keep the menu open when the entry is activated. */ keepOpen?: boolean; /** Render a divider above this entry (user menu only). */ separatorBefore?: boolean; }; /** A titled block of links inside a category. */ export type AppMenuLinkGroup = { title?: string; items: AppMenuLink[]; }; /** * A category listed in the app menu rail that shows a fixed set of links * instead of apps, e.g. the developer tools. */ export type AppMenuCategory = { /** Unique key, used for selection. */ id: string; /** Label shown in the rail. */ label: string; /** Sub header in the rail that this category is listed under. */ section?: string; groups: AppMenuLinkGroup[]; };