import { CollectionPreferencesProps } from '../interfaces'; type ContentDisplayItem = CollectionPreferencesProps.ContentDisplayItem; type ContentDisplayOption = CollectionPreferencesProps.ContentDisplayOption; type ContentDisplayOptionGroup = CollectionPreferencesProps.ContentDisplayOptionGroup; export interface OptionWithVisibility extends ContentDisplayOption { visible: boolean; } export interface OptionGroupNode { type: 'group'; id: string; label: string; visible: boolean; children: OptionTreeNode[]; } export interface OptionLeafNode extends OptionWithVisibility { type: 'leaf'; } export type OptionTreeNode = OptionGroupNode | OptionLeafNode; /** * Extracts a flat ordered list of leaf items from the contentDisplay tree (depth-first). */ export declare function walkLeaves(items: ReadonlyArray): { id: string; visible: boolean; }[]; /** * Returns options ordered by contentDisplay, with visibility applied. * Options not in contentDisplay are appended as non-visible. */ export declare function getSortedOptions({ options, contentDisplay }: { options: ReadonlyArray; contentDisplay: ReadonlyArray; }): ReadonlyArray; /** * Converts contentDisplay tree into an internal OptionTreeNode tree, * resolving labels from options/groups definitions. */ export declare function buildOptionTree(options: ReadonlyArray, groups: ReadonlyArray, contentDisplay: ReadonlyArray): OptionTreeNode[]; /** * Converts OptionTreeNode[] back to ContentDisplayItem[]. */ export declare function toContentDisplayItems(tree: OptionTreeNode[]): ContentDisplayItem[]; /** * Filters tree, keeping leaves matching filterText and groups with matching descendants. */ export declare function getFilteredTree(tree: OptionTreeNode[], filterText: string): OptionTreeNode[]; export declare function getFilteredOptions(options: ReadonlyArray, filterText: string): readonly OptionWithVisibility[]; export {};