import * as React from "react"; import type { SidebarItemData, SidebarItemProp, SidebarLinkComponentProp, SidebarProp, SidebarRenderItemProp } from "../../props/components/layout.prop.js"; export type { SidebarItemData, SidebarItemProp, SidebarLinkComponentProp, SidebarLinkProp, SidebarProductProp as SidebarProduct, SidebarProp, SidebarProp as SidebarProps, SidebarRenderItemProp, } from "../../props/components/layout.prop.js"; type RenderItem = (item: SidebarItemData, rowProps: SidebarRenderItemProp) => React.ReactNode; type SidebarHeaderProps = React.HTMLAttributes; type SidebarSectionProps = { label?: string; collapsed?: boolean; children?: React.ReactNode; }; type SidebarItemProps = { item: SidebarItemData; active?: boolean; sub?: boolean; onActivate?: (id: string) => void; /** * The row content stays library-composed — see {@link SidebarLinkProp}. Applied only when * `item.href` is set. */ linkComponent?: SidebarLinkComponentProp; /** * Use it when you compose `SidebarItem` by hand instead of passing `sections` + `linkComponent`. */ asChild?: boolean; /** @deprecated Use `linkComponent` / `asChild` — see {@link SidebarProp.renderItem}. */ renderItem?: RenderItem; }; export declare function SidebarHeader({ children, className, ...props }: SidebarHeaderProps): React.JSX.Element; export declare function SidebarSection({ label, collapsed, children, className, ...props }: SidebarSectionProps & React.HTMLAttributes): React.JSX.Element; export declare function SidebarItem({ item, active, sub, onActivate, linkComponent: LinkComponent, asChild, renderItem, children, ...props }: SidebarItemProps & Omit, "onClick">): React.JSX.Element; type RowProps = { item: SidebarItemProp; activeId: string; onSelect?: (id: string) => void; sub?: boolean; linkComponent?: SidebarLinkComponentProp; renderItem?: RenderItem; }; /** * The collapsible submenu group of a nested `SidebarItemProp`. Exported (not from the package — * only within `src/components/layout`) so `NavList` renders nested items through the SAME group as * the rail instead of dropping `item.children` on the floor (gh#815). */ export declare function NavGroup({ item, activeId, onSelect, linkComponent, renderItem }: RowProps): React.JSX.Element; export { createSidebarLink } from "./sidebar-link.js"; /** * Sidebar — data-driven vertical nav rail. Use {@link createSidebarLink} to adapt a router `Link`, * or `SidebarItem asChild` when composing rows by hand. */ export declare function Sidebar({ ariaLabel: ariaLabelCamel, activeId, onSelect, sections, product, onProductClick, brand, collapsed, children, linkComponent, renderItem, footer, "aria-label": ariaLabel, }: SidebarProp): React.JSX.Element;