import { Bounds, Range } from '../../types'; export type SyncAxis = 'x' | 'y' | 'xy' | 'none'; export interface SyncOptions { axis?: SyncAxis; syncCursor?: boolean; syncSelection?: boolean; syncZoom?: boolean; syncPan?: boolean; debounce?: number; bidirectional?: boolean; /** When set, used for fitAll; with bidirectional sync any pane can drive pan/zoom */ masterId?: string; } export interface ChartLike { getId(): string; getViewBounds(): Bounds; zoom(options: { x?: Range; y?: Range; animate?: boolean; }): void; pan(dx: number, dy: number): void; fit?(options?: { x?: Range; y?: Range; padding?: number | { x?: number; y?: number; }; }): void; getCursorPosition?(): { x: number; y: number; } | null; setExternalCursor?(x: number, y: number): void; clearExternalCursor?(): void; getSelectedPoints?(): { seriesId: string; indices: number[]; }[]; selectPoints?(points: { seriesId: string; indices: number[]; }[]): void; clearSelection?(): void; on(event: string, callback: (...args: unknown[]) => void): void; off(event: string, callback: (...args: unknown[]) => void): void; } export interface SyncEvent { sourceId: string; type: 'zoom' | 'pan' | 'cursor' | 'selection' | 'bounds'; data: unknown; } export declare class ChartGroup { private charts; private options; private eventHandlers; private isUpdating; private debounceTimers; private rafTimers; constructor(options?: SyncOptions); add(chart: ChartLike): this; addAll(...charts: ChartLike[]): this; remove(chart: ChartLike): this; getCharts(): ChartLike[]; size(): number; has(chart: ChartLike): boolean; syncAxis(axis: SyncAxis): this; syncZoom(enabled: boolean): this; syncPan(enabled: boolean): this; syncCursor(enabled: boolean): this; syncSelection(enabled: boolean): this; /** Update sync options and re-bind event handlers on all charts */ updateOptions(partial: Partial): this; getOptions(): Readonly; syncTo(bounds: Partial, excludeChartId?: string): void; resetAll(): void; fitAll(options?: { x?: Range; padding?: number; }): void; batch(fn: () => T): T; clearAllSelections(): void; destroy(): void; private isSyncSource; private hasValidViewBounds; private attachEventHandlers; private detachEventHandlers; private handleZoom; private handlePan; private handleCursor; private handleSelection; private propagateZoom; private propagatePan; private scheduleSyncAction; private debounceAction; } export declare function createChartGroup(charts: ChartLike[], options?: SyncOptions): ChartGroup; export declare function linkCharts(chart1: ChartLike, chart2: ChartLike, options?: SyncOptions): ChartGroup; export declare function createMasterSlave(master: ChartLike, slave: ChartLike, axis?: SyncAxis): ChartGroup;