import { default as React, ReactNode, ElementType } from 'react'; export interface NavigationItemProps { /** * Called when the item is clicked. Fires in addition to a parent * `Navigation`'s `onSelect` when selection is coordinated. */ onClick?: React.MouseEventHandler; /** * Marks this item as the current page. Maps directly to * `aria-current="page"` on the control, which also drives the selected * visual (stripe + row background) in CSS so the two cannot drift apart. * * When this item is inside a `Navigation`, selection is coordinated by the * parent and derived from `itemId`; `isSelected` is the fallback for * standalone (unmanaged) use. */ isSelected?: boolean; /** * Stable identity for coordinated selection. When the parent `Navigation`'s * resolved selection matches this `itemId`, the item renders as selected, and * clicking it reports this `itemId` to the parent's `onSelect`. */ itemId?: string; /** * The element or component to render as the control. Defaults to `"a"` when * `href` is set, otherwise `"button"`. Pass a router link component (e.g. * `as={Link}`) and its props (e.g. `to`) to integrate with client routing. */ as?: ElementType; /** * When set, the control renders as an anchor (unless `as` overrides it). The * href is sanitized against unsafe protocols. */ href?: string; /** The control's primary text (its accessible label). */ label: string; /** Optional secondary text rendered beneath the label. */ detail?: string; /** Optional decorative content rendered before the control (e.g. an icon). */ startContent?: ReactNode; /** * Optional content rendered after the control as a grid sibling (e.g. a * "more" action). Because it is a sibling of the control, not a child, it does * not create invalid nested interactive elements. */ endContent?: ReactNode; /** Optional value for `data-testid` attribute */ testId?: string; /** * Additional props are spread onto the control (e.g. `id`, `aria-*`, or a * router link's `to`). */ [key: string]: unknown; } /** * A single sidebar navigation control. * * **Wrap in a `