/**
 * Centralized Render Scheduler for the Grid component.
 *
 * This scheduler batches all rendering work into a single requestAnimationFrame,
 * eliminating race conditions between different parts of the grid (ResizeObserver,
 * framework adapters, virtualization, etc.) that previously scheduled independent RAFs.
 *
 * ## Design Principles
 *
 * 1. **Single RAF per frame**: All render requests are batched into one RAF callback
 * 2. **Phase-based execution**: Work is organized into ordered phases that run sequentially
 * 3. **Highest-phase wins**: Multiple requests merge to the highest requested phase
 * 4. **Framework-agnostic timing**: Eliminates need for "double RAF" hacks
 *
 * ## Render Phases (execute in order)
 *
 * - STYLE (1): Lightweight style/class updates, plugin afterRender hooks
 * - VIRTUALIZATION (2): Virtual window recalculation (scroll, resize)
 * - HEADER (3): Header re-render only
 * - ROWS (4): Row model rebuild + header + template + virtual window
 * - COLUMNS (5): Column processing + rows phase work
 * - FULL (6): Complete render including config merge
 *
 * @example
 * ```typescript
 * const scheduler = new RenderScheduler({
 *   mergeConfig: () => this.#mergeEffectiveConfig(),
 *   processColumns: () => this.#processColumns(),
 *   processRows: () => this.#rebuildRowModel(),
 *   renderHeader: () => renderHeader(this),
 *   updateTemplate: () => updateTemplate(this),
 *   renderVirtualWindow: () => this.refreshVirtualWindow(true),
 *   afterRender: () => this.#pluginManager?.afterRender(),
 *   isConnected: () => this.isConnected && this.#connected,
 * });
 *
 * // Request a full render
 * scheduler.requestPhase(RenderPhase.FULL, 'initial-setup');
 *
 * // Wait for render to complete
 * await scheduler.whenReady();
 * ```
 */
/**
 * Render phases in order of execution.
 * Higher phases include all lower phase work.
 */
export declare enum RenderPhase {
    /** Lightweight style updates only (plugin afterRender hooks) */
    STYLE = 1,
    /** Virtual window recalculation (includes STYLE) */
    VIRTUALIZATION = 2,
    /** Header re-render (includes VIRTUALIZATION) */
    HEADER = 3,
    /** Row model rebuild (includes HEADER) */
    ROWS = 4,
    /** Column processing (includes ROWS) */
    COLUMNS = 5,
    /** Full render including config merge (includes COLUMNS) */
    FULL = 6
}
/**
/**
 * Callbacks that the scheduler invokes during flush.
 * Each callback corresponds to work done in a specific phase.
 */
export interface RenderCallbacks {
    /** Merge effective config (FULL phase) */
    mergeConfig: () => void;
    /** Process columns through plugins (COLUMNS phase) */
    processColumns: () => void;
    /** Rebuild row model through plugins (ROWS phase) */
    processRows: () => void;
    /** Render header DOM (HEADER phase) */
    renderHeader: () => void;
    /** Update CSS grid template (ROWS phase) */
    updateTemplate: () => void;
    /** Recalculate virtual window (VIRTUALIZATION phase) */
    renderVirtualWindow: () => void;
    /** Run plugin afterRender hooks (STYLE phase) */
    afterRender: () => void;
    /** Check if grid is still connected to DOM */
    isConnected: () => boolean;
}
/**
 * Centralized render scheduler that batches all grid rendering into single RAF.
 */
export declare class RenderScheduler {
    #private;
    constructor(callbacks: RenderCallbacks);
    /**
     * Request a render at the specified phase.
     * Multiple requests are batched - the highest phase wins.
     *
     * @param phase - The render phase to execute
     * @param _source - Debug identifier for what triggered this request (unused, kept for API compatibility)
     */
    requestPhase(phase: RenderPhase, _source: string): void;
    /**
     * Returns a promise that resolves when the current render cycle completes.
     * If no render is pending, returns an already-resolved promise.
     */
    whenReady(): Promise<void>;
    /**
     * Set the initial ready resolver (called once on first render).
     * This connects to the grid's `ready()` promise.
     */
    setInitialReadyResolver(resolver: () => void): void;
    /**
     * Cancel any pending render.
     * Useful for cleanup when component disconnects.
     */
    cancel(): void;
    /**
     * Check if a render is currently pending.
     */
    get isPending(): boolean;
    /**
     * Get the current pending phase (0 if none).
     */
    get pendingPhase(): RenderPhase | 0;
}
//# sourceMappingURL=render-scheduler.d.ts.map