import type { UseSetStateSetMergedState } from "../use-set-state/index.cjs"; import type { Arrayable, Noop } from "../utils/basic.cjs"; export type UrlParamType = string | number | boolean | null | undefined; export type UrlParams = Record>; export type UseUrlSearchParamsMode = 'history' | 'hash' | 'hash-params'; export interface UseUrlSearchParamsOptions { /** * Remove nullish values from the URLSearchParams * * @defaultValue true */ removeNullishValues?: boolean; /** * Remove falsy values from the URLSearchParams * * @defaultValue false */ removeFalsyValues?: boolean; /** * Initial value for the URLSearchParams * * @defaultValue {} */ initialValue?: T & Record>; /** * Write back to `window.history` automatically * * @defaultValue true */ write?: boolean; } export type UseUrlSearchParamsReturns>> = readonly [ T, UseSetStateSetMergedState, Noop ]; /** * A React Hook that helps to manage the URL search params. * * There three mode in `useUrlSearchParams`: * * - **history**: like `/path/to/page?a=1&b=2` * - **hash**: like `/path/to/page#heading?a=1&b=2` (with `?` in hash) * - **hash-params**: like `/path/to/page#a=1&b=2` (without `?` in hash) */ export declare function useUrlSearchParams> = UrlParams>(mode?: UseUrlSearchParamsMode, options?: UseUrlSearchParamsOptions): UseUrlSearchParamsReturns;