import { Filter, FilterValue } from '../types';
/**
 * Returns an array of filters that are currently active (i.e., have a value set).
 *
 * @param {Filter[]} filters - Array of filter objects to check
 * @returns {Filter[]} Array of active filters
 */
export declare const getActiveFilters: (filters: Filter[]) => Filter[];
/**
 * Checks if any filters in the array have active values
 *
 * @param {Filter[]} filters - Array of filter objects to check
 * @returns {boolean} True if any filter has an active value
 */
export declare const checkActiveFilters: (filters: Filter[]) => boolean;
/**
 * Resets all filters to their default state
 *
 * @param {Filter[]} filters - Array of filter objects to reset
 * @returns {Filter[]} New array with reset filters
 */
export declare const resetFilters: (filters: Filter[]) => Filter[];
/**
 * Updates a single filter in an array of filters
 *
 * @param {Filter[]} filters - Array of filter objects
 * @param {string} filterId - ID of the filter to update
 * @param {FilterValue} value - New value for the filter
 * @returns {Filter[]} New array with updated filter
 */
export declare const updateSingleFilter: (filters: Filter[], filterId: string, value: FilterValue) => Filter[];
/**
 * Determines if two filter values are different.
 * For arrays (multiSelect), compares by id set (order-insensitive, avoids JSON serialization).
 * For singleSelect, compares by id if both are objects with id.
 *
 * @param {T} a - First value to compare
 * @param {T} b - Second value to compare
 * @returns {boolean} True if the values are different
 */
export declare const hasChangedFilter: <T>(a: T, b: T) => boolean;
/**
 * Checks if the selection value of a filter has changed by comparing references.
 * Uses reference equality (===) to detect if the parent has provided a new value.
 *
 * @param {Filter} existingFilter - The current filter state
 * @param {Filter} newFilter - The incoming filter from props
 * @returns {boolean} True if the selection value reference has changed
 */
export declare const hasFilterSelectionChanged: (existingFilter: Filter, newFilter: Filter) => boolean;
/**
 * Preserves the selection state from an existing filter into a new filter.
 * Used when filter configuration updates but the selection value reference hasn't changed,
 * allowing us to maintain user selections through configuration updates.
 *
 * @param {Filter} newFilter - The new filter configuration from props
 * @param {Filter} existingFilter - The existing filter with user's selections
 * @returns {Filter} New filter with configuration from newFilter and selection from existingFilter
 */
export declare const preserveFilterState: (newFilter: Filter, existingFilter: Filter) => Filter;
/**
 * Creates a deep clone of filters with updated item references.
 * Ensures that selected items reference the current items array for proper equality checks.
 * Used when initializing draft state to ensure selections use current item references.
 *
 * @param {Filter[]} filters - Array of filter objects to clone
 * @returns {Filter[]} New array with cloned filters and updated item references
 */
export declare const cloneFiltersWithItemRefs: (filters: Filter[]) => Filter[];
