import type { FilterState } from "../FilterListItemApi.js";
import type { PropertyAggregationValue } from "../types/AggregationTypes.js";
/**
* Unwraps a `linkedProperty` wrapper one level so callers can reason about the
* underlying filter state directly (e.g. for header controls that should
* follow the inner filter's capabilities).
*/
export declare function getEffectiveFilterState(state: FilterState | undefined): FilterState | undefined;
/** Returns true for filter state types that support in-filter search. */
export declare function supportsSearch(state: FilterState | undefined): boolean;
/** Returns true for filter state types that support isExcluding. */
export declare function supportsExcluding(state: FilterState | undefined): boolean;
/**
* Sentinel identity for the "No value" bucket (null/undefined property values).
*
* `selectedValues` is a `string[]`, so the null/undefined state needs a string
* stand-in that cannot collide with a real value. Put `NO_VALUE` in `selectedValues`
* to filter for objects whose property `$isNull`.
*/
export declare const NO_VALUE = "__NO_VALUE__";
/**
* Returns true if the given value represents "No value" (a null/undefined
* property value), i.e. the {@link NO_VALUE} sentinel (or a raw null/undefined
* defensively).
*/
export declare function isNoValue(value: string | null | undefined): boolean;
/**
* Merges every null/undefined aggregation row into a single "No value" bucket
* (keyed by the {@link NO_VALUE} sentinel) placed at the position of the first
* such row encountered. Backends sometimes return separate rows for null and
* undefined; this collapses them so consumers (listogram, dropdown,
* multi-select) all see one canonical "No value" row.
*
* Literal empty-string (`""`) rows are real values and are left untouched as
* their own distinct rows.
*/
export declare function dedupeEmptyAggregationRows(values: PropertyAggregationValue[]): PropertyAggregationValue[];
/** Case-insensitive substring filter for search functionality. */
export declare function filterValuesBySearch<T>(values: T[], searchValue: string, getValue: (item: T) => string): T[];
/**
* Returns a "cleared" version of the given filter state, preserving the
* discriminator and `isExcluding` flag so the UI doesn't snap between filter
* modes when a user clicks "Clear all selections". Returns `undefined` if no
* cleared form is meaningful for the state shape.
*/
export declare function clearFilterState(state: FilterState | undefined): FilterState | undefined;
/**
* Returns the state with `isExcluding` flipped, preserving the discriminator
* and unwrapping/re-wrapping any `linkedProperty` wrapper. Returns `undefined`
* if the wrapped state is one that does not support excluding.
*/
export declare function toggleIsExcluding(state: FilterState): FilterState | undefined;
/**
* Returns the number of values the user has actively selected for filters
* whose UI surfaces a selected-of-total count (LISTOGRAM, SINGLE_SELECT,
* MULTI_SELECT, TEXT_TAGS). Returns 0 for state shapes that don't have a
* discrete list of selected values.
*/
export declare function getSelectedCount(state: FilterState | undefined): number;
/** Check if a filter state has an active (non-empty) value. */
export declare function filterHasActiveState(state: FilterState | undefined): boolean;
