import { type ComponentPropsWithoutRef, type ReactNode } from 'react'; import type { SectionAction } from './SectionHeader'; /** * One row of a sidebar: a label, an optional count, an active state * (Ship's NavItem, 2026-09-02, verbatim). * * A count is a number of ONE thing, and its tooltip says which ("18 * open", "5 active") — the caller passes the number and the words for it, * and a zero is not drawn at all. That is this row's rule; a *tab's* * count draws its zero (see Tabs) — both rulings stand, deliberately. * * Active is the same fill as a selected tab — `bg-active`, neutral. * * `menu` gives the row a "More options" menu (UIG-44, Katerina, 30 * September): a ⋮ that shows while the row is pointed at, focused or its * menu is open, in the count's place — the count steps aside rather than * sitting under it. The ⋮ is beside the link, not inside it (a button inside * an anchor is not a button), and follows it in the Tab order. * * `children` are rows under this one (Katerina, 2 October: Leaf's folder * tree). The row stays a link; while it is pointed at or focused its icon * gives way to an arrow that folds the rows, in the icon's own place — so a * row with rows under it is as wide as one without. The arrow is beside the * link, like the ⋮. The rows slide as `CollapsibleSection`'s do, indented * past the icon so their icons start under this row's label. * * `action` is one button of its own beside the ⋮ — any icon, with its tooltip * (Katerina, 14 October: Peek's Open work keeps its ✕ "Remove from list" in * sight, not inside a menu). The same shape as a `SectionHeader`'s actions, * and drawn the same way: an `IconButton` that shows with the ⋮, in the * count's place, before the ⋮ when there is one. One, never a row of them: a * second thing to do goes in the menu. * * `hint` is shown only while the row is pointed at or focused, left of the * count — a neutral `Chip`, typically. It takes its own room while it shows, * so the label ends with "…" before it instead of running under it. * * `unread` brightens the row's words and icon, sets the label in medium, and * draws the `UnreadDot` at the right; `urgent` with it draws the warning badge * in the dot's place (Katerina, 2 October: Peek's row, moved in). The ⋮ lands * on whatever is in that place, and with nothing there it takes no room until * the row is pointed at, so a label at rest keeps the row's whole width. * * Active is `bg-nav-active`, the current row in a sidebar, which each theme * sets: the selected tab's neutral fill in most, Signal's blue in Signal. */ export interface NavItemProps extends Omit, 'href' | 'children'> { label: string; href: string; /** `0` or absent renders no counter. */ count?: number; /** What the count counts, for the tooltip — "18 open", "5 active". */ countLabel?: string; active?: boolean; /** 16px, stroke 1.5. */ icon?: ReactNode; /** The row's "More options" menu: `MenuItem`s. Absent, the row has no menu and is exactly the plain row. */ menu?: ReactNode; /** The ⋮'s accessible name and tooltip. Default "More options for {label}". */ menuLabel?: string; /** One button beside the ⋮, shown with it: any 16px icon, its tooltip and its handler — a `SectionHeader` action's shape. With a menu too, it sits before the ⋮. */ action?: SectionAction; /** Shown only while the row is pointed at or focused, left of the count: a neutral `Chip`, typically. */ hint?: ReactNode; /** A sentence about the item, in the package's tooltip while the label is pointed at; the row stays one line. Absent or blank, no tooltip. */ tooltip?: string; /** Something new here: brighter words, the label in medium, and the `UnreadDot` at the right. Say so in the row's own words for assistive tech too. */ unread?: boolean; /** With `unread`: the warning badge in the dot's place. */ urgent?: boolean; /** Rows under this one, folding under it: `NavItem`s. While the row is pointed at or focused, its icon becomes the arrow. */ children?: ReactNode; /** With `children`: open unless told otherwise. */ defaultOpen?: boolean; /** With `children`: the caller owns the state. */ open?: boolean; onOpenChange?: (open: boolean) => void; className?: string; } export declare function NavItem({ label, href, count, countLabel, active, icon, menu, menuLabel, action, hint, tooltip, unread, urgent, children, defaultOpen, open: openProp, onOpenChange, className, onClick, ...props }: NavItemProps): import("react").JSX.Element; //# sourceMappingURL=NavItem.d.ts.map