import { type KeyboardEvent, type MouseEvent, type ReactElement } from "react"; import { type IUiResizableSidebarNavigationItem, type IUiResizableSidebarNavigationSubItem, type UiResizableSidebarNavigationNamingConfig } from "./types.js"; /** * @internal */ export type UiResizableSidebarNavigationItem = IUiResizableSidebarNavigationItem | IUiResizableSidebarNavigationSubItem; /** * @internal */ export interface IUiResizableSidebarNavigationProps { items: IUiResizableSidebarNavigationItem[]; /** * Called when the user activates an item. A link item is not prevented from following its `href`; * call `event.preventDefault()` to route it in the application instead. A click with Alt, Ctrl, Meta * or Shift on a link item is left to the browser (new tab, window or download) and does not call * this. * * A group with an `href` calls this only while it is not active. Activating an active group toggles * its sub-items, so its own `href` is then reached only by a modified click; list a group page that * must stay reachable as one of its sub-items. In rail mode a group does not call this: activating * it opens the flyover with its sub-items. */ onSelect?: (item: UiResizableSidebarNavigationItem, event: MouseEvent | KeyboardEvent) => void; accessibilityConfig: UiResizableSidebarNavigationNamingConfig; /** * Rail mode lists only the icons of the top-level items. An item shows its label in a tooltip, and a * group lists its sub-items in a flyover that opens on hover, on activation or with the Right arrow * key. Keyboard focus on a group with a closed flyover shows the group label in a tooltip. * Defaults to whether the nearest {@link UiResizableSidebarProvider} is collapsed to a rail. */ isRail?: boolean; /** * Class name of the rail flyover. The flyover renders in a portal, so styles of the navigation do not * reach it. */ flyoverClassName?: string; dataTestId?: string; } /** * Item list of a sidebar: top-level pages and expandable groups of sub-pages. A group expands by itself * when it or one of its sub-items is selected, and the user can expand and collapse it with its chevron * or the Left and Right arrow keys. The list is one tab stop: Up and Down move between the listed items, * Home and End jump to the ends. * * @remarks * Selection is driven by the `isSelected` flags of the items; the list does not keep a selection of its * own. A group with a selected sub-item is highlighted together with the sub-item. * * @internal */ export declare function UiResizableSidebarNavigation({ items, onSelect, accessibilityConfig, isRail: isRailProp, flyoverClassName, dataTestId, }: IUiResizableSidebarNavigationProps): ReactElement; //# sourceMappingURL=UiResizableSidebarNavigation.d.ts.map