import { type HTMLAttributes, type MouseEvent, type ReactNode } from 'react';
import { type LinkTarget } from '../components/AppLink.js';
export interface AppFrameLabels {
navigation: string;
skipToContent: string;
openNavigation: string;
closeNavigation: string;
expandSidebar: string;
collapseSidebar: string;
resizeSidebar: string;
}
export interface AppFrameState {
/** Labels stay visible in the mobile drawer even when the desktop rail is collapsed. */
expanded: boolean;
isMobile: boolean;
mobileOpen: boolean;
toggle: () => void;
closeNavigation: () => void;
}
export declare function useAppFrame(): AppFrameState;
type Slot = ReactNode | ((state: AppFrameState) => ReactNode);
export interface AppFrameProps extends Omit, 'children'> {
children: ReactNode;
/** Identity at the top of navigation. Render a compact mark when expanded is false. */
brand?: Slot;
navigation: Slot;
footer?: Slot;
/** Page tools above the independently scrolling main content. */
header?: ReactNode;
/** Optional notice above both navigation and content. */
banner?: ReactNode;
expanded?: boolean;
defaultExpanded?: boolean;
onExpandedChange?: (expanded: boolean) => void;
width?: number;
defaultWidth?: number;
/** Commits once when a drag ends, and on each keyboard or reset action. */
onWidthChange?: (width: number) => void;
minWidth?: number;
maxWidth?: number;
railWidth?: number;
resizable?: boolean;
/** Viewport width below which navigation becomes a modal drawer. */
mobileBreakpoint?: number;
/** A changed route key closes mobile navigation. */
navigationKey?: string;
/** Reset navigation scroll only when this section changes; defaults to navigationKey. */
navigationResetKey?: string;
/** Attributes shared by desktop navigation and the mobile dialog. */
sidebarProps?: HTMLAttributes;
/** Removes the inset and border around content. */
fullBleed?: boolean;
labels?: Partial;
mainId?: string;
mainClassName?: string;
}
/** An inset application surface beside a resizable icon rail or navigation column.
* Router, identity, persistence and permissions belong to the host. Import app-frame.css. */
export declare function AppFrame({ children, brand, navigation, footer, header, banner, expanded: controlledExpanded, defaultExpanded, onExpandedChange, width: controlledWidth, defaultWidth, onWidthChange, minWidth, maxWidth, railWidth, resizable, mobileBreakpoint, navigationKey, navigationResetKey, sidebarProps, fullBleed, labels: labelOverrides, mainId: suppliedMainId, mainClassName, className, style, ...props }: AppFrameProps): import("react").JSX.Element;
/** Put in the page header on mobile, and the sidebar footer on desktop. */
export declare function AppFrameToggle({ className, ...props }: Omit, 'children'>): import("react").JSX.Element;
export interface AppFrameNavItemProps extends Omit, 'children' | 'onClick'>, LinkTarget {
label: string;
/** Optional, such as a status mark; the rail shows the label's first letter without one. */
icon?: ReactNode;
/** A second line under the label, such as a session's state. Not shown in the rail. */
detail?: ReactNode;
selected?: boolean;
/** Such as a count, read after the label, so give it its words (`CountBadge`'s `label`).
* Not shown in the rail. */
badge?: ReactNode;
disabled?: boolean;
/** A control at the item's end, beside the link rather than in it, such as an unpin button.
* It shows while the item is hovered or focused, and not in the rail. */
action?: ReactNode;
onClick?: (event: MouseEvent) => void;
}
/** Router-aware navigation that keeps icon-only rail items named and discoverable.
* Other attributes, such as `onContextMenu` or `draggable`, go on the link or button. */
export declare function AppFrameNavItem({ label, icon, detail, selected, badge, disabled, action, onClick, className, href, reloadDocument, target, ...rest }: AppFrameNavItemProps): import("react").JSX.Element;
export interface AppFrameNavGroupProps extends Omit, 'children' | 'onClick'>, LinkTarget {
label: string;
/** Stands for the group in the rail, where its items open beside it, and leads its row when
* nested. Defaults to the label's first letter in the rail. */
icon?: ReactNode;
/** One of its items is the current page, which the rail's icon shows while they're out of sight. */
selected?: boolean;
/** The group's own page, at `href`, is the current one. */
current?: boolean;
/** False shows the items under a plain heading with no toggle. */
collapsible?: boolean;
open?: boolean;
defaultOpen?: boolean;
/** Keep `open` in `usePersistedState` to remember it. */
onOpenChange?: (open: boolean) => void;
/** How many items it holds, shown beside its heading while it is folded. */
count?: number;
/** A control at the heading's end, such as a menu or an add button. It shows while the
* heading is hovered or focused, and not in the rail. */
action?: ReactNode;
onClick?: (event: MouseEvent) => void;
children: ReactNode;
}
/** Named navigation items that fold under their heading, and open beside the rail from one icon.
* A group inside another, or one with its own page at `href`, shows its heading as a row, and
* nests its items under it. Other attributes, such as `onContextMenu`, go on the heading. */
export declare function AppFrameNavGroup({ label, icon, selected, current, collapsible, open, defaultOpen, onOpenChange, count, action, onClick, href, reloadDocument, target, className, children, ...rest }: AppFrameNavGroupProps): import("react").JSX.Element;
export { AppFrameNavSwitch, type AppFrameNavSwitchItem } from './navSwitch.js';
export { type AppFrameNavigationPlacement, useAppFrameNavigationPlacement } from './placement.js';
export { AppFrameListTakeover, AppFrameTakeover, AppFrameTakeoverBack, AppFrameTakeoverContent, type AppFrameTakeoverGroup, type AppFrameTakeoverRow, type AppFrameTakeoverState, useAppFrameTakeover, } from './takeover.js';