import type { FilterValue, FilterDef, SortValue, SortDef } from "../types.js";
/** Options for {@link useResourceFilters}. */
export interface UseResourceFiltersOptions {
    /** Available filter definitions. Determines which properties can be filtered. */
    readonly filterDefs?: readonly FilterDef[];
    /** Available sort definitions. Determines which properties can be sorted. */
    readonly sortDefs?: readonly SortDef[];
    /** Initial active filters (e.g. restored from URL params on mount). */
    readonly initialFilters?: readonly FilterValue[];
    /** Initial active sort (e.g. restored from URL params on mount). */
    readonly initialSort?: SortValue | null;
    /** Initial search query (e.g. restored from URL params on mount). */
    readonly initialQuery?: string;
    /**
     * Called whenever filter, sort, or query state changes. The consumer
     * uses this to sync state to URL search params or any other
     * persistence layer. The hook itself has zero router dependency.
     */
    readonly onStateChange?: (state: FilterSortState) => void;
    /** Debounce delay in milliseconds for the search query. @default 300 */
    readonly queryDebounceMs?: number;
}
/** Serializable snapshot of filter + sort + query state. */
export interface FilterSortState {
    readonly filters: readonly FilterValue[];
    readonly sort: SortValue | null;
    readonly query: string;
}
/** Return value of {@link useResourceFilters}. */
export interface UseResourceFiltersReturn {
    /** Current active filters. */
    readonly filters: readonly FilterValue[];
    /** Add a filter. If a filter with the same `filterId` + `operator` exists, it is replaced. */
    readonly addFilter: (filter: FilterValue) => void;
    /** Remove a specific filter by its `filterId`. Removes all operators for that filter. */
    readonly removeFilter: (filterId: string) => void;
    /** Remove all active filters. */
    readonly clearFilters: () => void;
    /** Current active sort, or `null` if unsorted. */
    readonly sort: SortValue | null;
    /** Set the active sort. Pass `null` to clear sorting. */
    readonly setSort: (sort: SortValue | null) => void;
    /** The raw search query as typed by the user. */
    readonly query: string;
    /** The debounced search query (safe to pass to data-fetching hooks). */
    readonly debouncedQuery: string;
    /** Update the raw search query. Debouncing is handled internally. */
    readonly setQuery: (query: string) => void;
    /** `true` when any filters are active. */
    readonly hasActiveFilters: boolean;
}
/**
 * Headless hook that manages filter, sort, and search query state for
 * a resource collection.
 *
 * State changes are communicated to the consumer via `onStateChange`
 * so they can be synced to URL search params. The hook itself has
 * **zero router dependency** (DD-004 compliance).
 *
 * Platform builders use this alongside {@link useResourceCollection}
 * for full control. The `ResourceWorkbench` shell composes both.
 *
 * @example
 * ```tsx
 * const filters = useResourceFilters({
 *   filterDefs: agentFilterDefs,
 *   sortDefs: agentSortDefs,
 *   onStateChange: (state) => syncToUrl(state),
 * });
 * ```
 */
export declare function useResourceFilters(options?: UseResourceFiltersOptions): UseResourceFiltersReturn;
//# sourceMappingURL=useResourceFilters.d.ts.map