import { Field } from '../types'; import { GlobalFilters } from './types'; /** * Init and maintain a set of filters on the search part of the URL. * * 1. filters are displayed in the URL as URL-encoded JSON array of strings. The use of intermediate JSON encoding ensures that we can encode arbitrary data. * 2. params in the URL are parsed only during initialization, afterwards they are a read-only side effect * 3. the single source of truth is the internal filter state maintained by the hook * * @param fields list of supported fields(read-only meta-data) * @param filterPrefix prefix for the field IDs to avoid name conflicts with other query params in the URL * @returns [selectedFilters, setSelectedFilters] */ export declare const useUrlFilters: ({ fields, filterPrefix, }: { fields: Field[]; filterPrefix?: string; }) => [GlobalFilters, (filters: GlobalFilters) => void];