import type { Datum } from "../charts/shared/datumTypes";
export { useCrosshairPosition, setCrosshairPosition, clearCrosshairPosition } from "./LinkedCrosshairStore";
export interface UseSelectionOptions {
    /** Name of the selection to participate in */
    name: string;
    /** Unique client ID. Defaults to React.useId() */
    clientId?: string;
    /** Fields this client cares about (for predicate context) */
    fields?: string[];
}
export interface UseSelectionResult {
    /** Returns true if the datum matches the current selection */
    predicate: (datum: Datum) => boolean;
    /** Whether any selection clause is currently active */
    isActive: boolean;
    /** Set a point selection (categorical values) */
    selectPoints: (fieldValues: Record<string, unknown[]>) => void;
    /** Set an interval selection (numeric ranges) */
    selectInterval: (fieldRanges: Record<string, [number, number]>) => void;
    /** Clear this client's clause */
    clear: () => void;
    /** This client's ID */
    clientId: string;
}
export declare function useSelection(options: UseSelectionOptions): UseSelectionResult;
export interface UseLinkedHoverOptions {
    /** Selection name. Defaults to "hover" */
    name?: string;
    /** Fields to include in the hover selection */
    fields: string[];
}
export interface UseLinkedHoverResult {
    /** Call with a datum to set hover, or null to clear */
    onHover: (datum: Datum | null) => void;
    /** Returns true if datum matches the hover selection */
    predicate: (datum: Datum) => boolean;
    /** Whether any hover is active */
    isActive: boolean;
}
export declare function useLinkedHover(options: UseLinkedHoverOptions): UseLinkedHoverResult;
export interface UseBrushSelectionOptions {
    /** Selection name */
    name: string;
    /** Field mapped to the x-axis brush extent */
    xField?: string;
    /** Field mapped to the y-axis brush extent */
    yField?: string;
}
export interface UseBrushSelectionResult {
    brushInteraction: {
        brush: "xyBrush" | "xBrush" | "yBrush";
        during: (extent: BrushExtent | null) => void;
        end: (extent: BrushExtent | null) => void;
    };
    /** Interaction config to pass to frameProps.interaction */
    /** Returns true if datum matches the brush selection */
    predicate: (datum: Datum) => boolean;
    /** Whether any brush is active */
    isActive: boolean;
    /** Clear the brush */
    clear: () => void;
}
type LinearBrushExtent = [number, number];
type XYBrushExtent = [[number, number], [number, number]];
type BrushExtent = LinearBrushExtent | XYBrushExtent | [number, number][];
export declare function useBrushSelection(options: UseBrushSelectionOptions): UseBrushSelectionResult;
/**
 * Returns the subset of `data` that matches the given selection.
 * In crossfilter mode, pass the consumer's clientId so its own clause is excluded.
 */
export declare function useFilteredData<T extends Datum>(data: T[], selectionName: string, clientId?: string): T[];
