import type { Chip } from './state/chip-group-state-reducer.js'; import type { ChipOwnProps } from '../chip/types/chip.js'; /** * Iterates over measured chips and returns the index of the first chip that no longer fits * in the container (i.e. the cutoff between visible and hidden). Returns `chips.length` if * all chips fit on one line. * The first chip is always considered visible regardless of container width. * * @param chipEntries - chip entries derived from state.chips * @param containerWidth - Width of the chip group container. * @param chipSize - The size of the spacing and chips in the group * @param controlWidth - Pixel width of the "Show more / Show less" control button, or `0` when no control is mounted. * @param controlShow - Whether the control's visibility is managed automatically (`'auto'`) or is always present (`'always'`). */ export declare function findOverflowChipIndex(chipEntries: Array<[string, Chip]>, containerWidth: number, chipSize: ChipOwnProps['size'], controlWidth: number, controlShow: 'auto' | 'always' | undefined): number; /** * Determines whether an expanded chip group still needs its auto control, i.e. whether all * chips fit on a single line. Computed synchronously from the measured chip widths rather * than from the rendered DOM. * * All chips fit only when: * - their combined width (including flex gaps, and the control's width when it is always * shown) fits within the container, AND * - no explicit `maxVisibleChips` limit would still hide some chips after collapsing. * * @param chipEntries - chip entries derived from state.chips * @param containerWidth - Width of the chip group container. * @param chipSize - The size of the spacing and chips in the group * @param controlWidth - Pixel width of the "Show more / Show less" control button, or `0` when no control is mounted. * @param controlShow - Whether the control's visibility is managed automatically (`'auto'`) or is always present (`'always'`). * @param maxVisibleChips - Maximum number of chips to keep visible when collapsed, or `'auto'`. */ export declare function computeAllChipsFitExpanded(chipEntries: Array<[string, Chip]>, containerWidth: number, chipSize: ChipOwnProps['size'], controlWidth: number, controlShow: 'auto' | 'always' | undefined, maxVisibleChips: 'auto' | number): boolean;