import type { FilterGroup, FilterId, SingleFilter } from "@fn-sphere/core"; type RuleNode = { type: "Filter"; data: SingleFilter; parentId: FilterId; } | (Omit & { parentId: FilterId; conditionIds: FilterId[]; }); /** * Flatten the filter group to a map for easier manipulation. * * @internal */ export type FilterMap = { [key: string]: RuleNode | undefined; }; /** * Convert the {@link FilterGroup} to {@link FilterMap}. */ export declare const toFilterMap: (rootFilterGroup: FilterGroup, parent?: FilterId) => FilterMap; export declare const fromFilterMap: (map: FilterMap, rootKey?: FilterId) => FilterGroup; /** * Calculates the depth of a given filter rule within the filterMap structure. * The root filter has a depth of 0. Each step towards a child filter increases the depth by 1. */ export declare const getDepthOfRule: (filterMap: FilterMap, id: FilterId) => number; export {}; //# sourceMappingURL=filter-map.d.ts.map