/**
 * @template T
 * @typedef {(discreteInterval: import("@genome-spy/core/genome/genome.js").DiscreteChromosomeInterval, signal: AbortSignal) => Promise<T>} DiscreteIntervalLoader
 */
/**
 * @template T
 * @typedef {object} DiscreteIntervalLoaders
 * @prop {DiscreteIntervalLoader<T>} load
 * @prop {(discreteIntervals: import("@genome-spy/core/genome/genome.js").DiscreteChromosomeInterval[], signal: AbortSignal) => Promise<T[]>} [loadBatch]
 */
/**
 * Divides the domain into windows and loads the data for one or two consecutive windows
 * that cover the visible interval.
 *
 * @abstract
 */
export default class SingleAxisWindowedSource extends SingleAxisLazySource {
    /**
     * @type {{windowSize?: number | import("../../../spec/parameter.js").ExprRef}}
     * @protected
     */
    protected params: {
        windowSize?: number | import("../../../spec/parameter.js").ExprRef;
    };
    /**
     * @param {import("../../../spec/data.js").DebouncedData} debounceParams
     * @protected
     */
    protected setupDebouncing(debounceParams: import("../../../spec/data.js").DebouncedData): void;
    /**
     * Listen to the domain change event and update data when the covered windows change.
     *
     * @param {number[]} domain Linearized domain
     */
    onDomainChanged(domain: number[]): void;
    /**
     * Listen to the domain change event and update data when the covered windows change.
     *
     * @param {number[]} interval linearized domain
     * @protected
     */
    protected loadInterval(interval: number[]): Promise<void>;
    /**
     * @protected
     */
    protected reloadLastDomain(): void;
    /**
     * Splits the interval into discrete chromosomal intervals – one for each chromosome –
     * and loads the data using a batched loader when available. Handles abort signals
     * and errors.
     *
     * @param {number[]} interval
     * @param {DiscreteIntervalLoader<T> | DiscreteIntervalLoaders<T>} loader
     * @return {Promise<T[]>}
     * @template T
     * @protected
     */
    protected discretizeAndLoad<T>(interval: number[], loader: DiscreteIntervalLoader<T> | DiscreteIntervalLoaders<T>): Promise<T[]>;
    /**
     *
     * @param {number[]} interval Domain
     * @param {number} windowSize
     * @param {function(number[]):void} callback
     * @protected
     */
    protected callIfWindowsChanged(interval: number[], windowSize: number, callback: (arg0: number[]) => void): void;
    #private;
}
export type DiscreteIntervalLoader<T> = (discreteInterval: import("@genome-spy/core/genome/genome.js").DiscreteChromosomeInterval, signal: AbortSignal) => Promise<T>;
export type DiscreteIntervalLoaders<T> = {
    load: DiscreteIntervalLoader<T>;
    loadBatch?: (discreteIntervals: import("@genome-spy/core/genome/genome.js").DiscreteChromosomeInterval[], signal: AbortSignal) => Promise<T[]>;
};
import SingleAxisLazySource from "./singleAxisLazySource.js";
//# sourceMappingURL=singleAxisWindowedSource.d.ts.map