import type { LineChartSeries } from '../LineChartContext'; interface UseLineChartActiveKeyResult { /** * Resolved active key after normalising stale values against the live * `seriesByKey` map. `null` whenever the controlled value points at a key * that no longer exists in `series`. */ activeKey: string | null; /** * Setter that deduplicates per-pixel mousemove/hover events and forwards to * the controlled callback. Use this instead of writing state directly so * consumer callbacks don't fire with the same value frame after frame. */ setActiveKey: (key: string | null) => void; } /** * Controlled/uncontrolled active-series key with two safety nets: * * 1. If the controlled key points at a series that has disappeared (filter, * schema change, refresh) the hook pushes `null` back through * `onActiveKeyChange` so sibling charts stop highlighting a stale key. * 2. The setter dedupes against a ref so per-pixel hover events don't keep * firing the callback after `useState` already bailed out. * * Refs are synced during render so parent-driven external resets flow through * without a stale comparison. */ export declare const useLineChartActiveKey: ({ controlledActiveKey, onActiveKeyChange, seriesByKey, }: { controlledActiveKey: string | null | undefined; onActiveKeyChange: ((key: string | null) => void) | undefined; seriesByKey: Map; }) => UseLineChartActiveKeyResult; export {};