/** * Shared helpers for working with saved/restored filter state. * * Lives next to the cache hooks so both `useRestoredFilters` and * `useRestoredInitialState` derive `activeCount` from the same rules * — matching `GenericFilter`'s in-component `activeFilters` semantics. */ /** * Returns true if a saved filter entry should count as an "active" filter. * * Mirrors `GenericFilter`'s `activeFilters` memo. Because we don't have * `filterConfig.type` at this layer, the shape itself is the signal: * * - `range` present (non-null/non-undefined) → treat as a date-style filter * "anytime" → inactive (default — user hasn't filtered by date) * "custom" → active only when both start and end dates are filled * any other → active (e.g. "today", "last7days") * - no `range` → treat as multiselect-style: active iff `values.length > 0` */ export function isFilterActive(f: any): boolean; /** * Count active filter *categories* in a saved filter map. * Returns the same number the badge shows immediately after Apply. */ export function countActiveFilters(filters: any): number; /** * Merge saved filter values into a fresh clone of `initialFormikValues`. * * Only adopts keys the parent declared in `initialFormikValues` — this * prevents stale schema keys from leaking into formik state where they * would survive "Clear All" (which rebuilds from `initialFormikValues`). */ export function mergeRestoredFilters(initialFormikValues: any, savedFilters: any): any;