import type { MutableRefObject, ReactNode } from 'react'; import type { ChipStackFaceItem, ChipStackFanOutDirection, ChipStackOverflowRenderArgs, ChipStackVariant } from './types'; type ChipStackAnimatedLayout = { size: number; stackStep: number; gap: number; minTrackWidth: number; }; type ChipStackAnimatedLayoutOverrides = Partial; export type ChipStackSlotModel = { key: string; render: () => ReactNode; }; /** Three exclusive render paths resolved from props. */ export declare enum ChipStackRenderMode { StaticChildren = "static-children", StaticItems = "static-items", AnimatedChildren = "animated-children", AnimatedItems = "animated-items" } /** Returns true when the variant is any of the animated variants. */ export declare function isAnimatedVariant(variant: ChipStackVariant): boolean; /** * Extracts the fan-out direction from the variant string. * Only meaningful for fanout variants. */ export declare function getFanOutDirection(variant: ChipStackVariant): ChipStackFanOutDirection; /** * Resolves which render path `ChipStack` should take. * Returns `null` when there is nothing to render. */ export declare function resolveChipStackMode(variant: ChipStackVariant, hasChildren: boolean, hasItems: boolean): ChipStackRenderMode | null; export declare function getChipStackAnimatedLayout({ size: sizeProp, stackStep: stackStepProp, gap: gapProp, minTrackWidth: minTrackWidthProp, }: ChipStackAnimatedLayoutOverrides): ChipStackAnimatedLayout; export declare function getFanOutAnchorIndex(slotCount: number, direction: ChipStackFanOutDirection): number; /** True when `maxItems` forces overflow handling. */ export declare function isChipStackAnimatedCapped(sourceCount: number, maxItems: number | undefined): boolean; /** * Splits `items` into visible and hidden slices based on `maxItems`. * * Overflow triggers when `items.length >= maxItems` and `maxItems >= 1`. * The first `maxItems - 1` items are visible; the rest are hidden. * When `maxItems` is undefined or `< 1`, all items are visible and hidden is empty. */ export declare function splitChipStackOverflow(items: readonly T[], maxItems: number | undefined): { visibleItems: readonly T[]; hiddenItems: readonly T[]; }; export declare function getReactChildKey(child: unknown, index: number): string; export declare function buildChipStackSlots({ items, maxItems, getItemKey, renderItem, renderOverflow, slotSize, }: { items: readonly T[]; maxItems: number | undefined; getItemKey: (item: T, sourceIndex: number) => string; renderItem: (item: T, sourceIndex: number, ctx: { slotSize: number; }) => ReactNode; renderOverflow: (args: ChipStackOverflowRenderArgs) => ReactNode; slotSize: number; }): ChipStackSlotModel[]; export declare function buildChipStackSlotsFromChildren({ children, maxItems, slotSize, renderOverflow, }: { children: ReactNode; maxItems: number | undefined; slotSize: number; renderOverflow: (args: ChipStackOverflowRenderArgs) => ReactNode; }): ChipStackSlotModel[]; export declare function areSlotWidthArraysEqual(a: number[], b: number[]): boolean; export declare function computeFannedOutLeftPositionsPx(slotCount: number, anchorIndex: number, slotWidthsPx: number[], gap: number, stackStep: number, fallbackSlotWidthPx: number): number[]; export declare function computeCollapsedStackWidthPx(slotCount: number, stackStep: number, faceSize: number): number; export declare function computeFanOutTranslateXPx(slotCount: number, isHovering: boolean, fannedLeftPositionsPx: number[], stackStep: number): number[]; export declare function computeFannedRowWidthPx(slotCount: number, fannedLeftPositionsPx: number[], slotWidthsPx: number[], collapsedWidthPx: number, fallbackSlotWidthPx: number): number; export declare function readMeasuredSlotWidthsPx(slotCount: number, slotRefs: MutableRefObject>, fallbackSlotWidthPx: number): number[]; export declare function getChipStackFaceItemKey(item: ChipStackFaceItem, index: number): string; export declare function getChipStackFaceInitials(item: ChipStackFaceItem): string; export declare function getChipStackFaceItemTooltipContent(item: ChipStackFaceItem): ReactNode | null; export {};