import type { ComputedRef, Ref } from 'vue'; import type { Filter, FilterGroup, FilterKeys, FilterValues, GetFiltersFromGroups } from '@/components/filters/filters.type'; interface Options[]> { filterGroups: () => TGroups; persistInUrl?: boolean | string; } export interface Filters[], TFilters extends readonly Filter[]> { /** * List of currently active filters (i.e., those whose value differs from their default or are open). */ activeFilters: ComputedRef; /** * Clears all filters by resetting their values to their default values. */ clearAllFilters: () => void; /** * Clears the value of a filter and removes it from the active list. * @param key The filter key to clear. * @param onlyIfEmpty If true, the filter is only cleared if it is currently empty. */ clearFilter: (key: FilterKeys, onlyIfEmpty?: boolean, onlyIfNonStatic?: boolean) => void; /** * List of filter groups, each containing a list of filters. */ filterGroups: ComputedRef; /** * List of all filters, including those that are not currently active. */ filters: ComputedRef; /** * The key of the currently opened filter (e.g., for showing dropdowns or UI focus). */ openFilterKey: Ref | null>; /** * The current filter values. */ values: Ref>; } export declare function useFilters[], TFilters extends readonly Filter[] = GetFiltersFromGroups>(options: Options): Filters; export {};