import { Cache } from 'gis-tools/index.js';
import Source from './source.js';
import type { TileRequest } from '../worker.spec.js';
/**
 * # S2 Tiles Source
 *
 * A Tile caching mechanic that stores all tile data in a single file. Great for cloud storage.
 *
 * NOTE: This is most likely deprecated and may be removed in the future to be replaced
 * by S2PMTilesSource.
 */
export default class S2TilesSource extends Source {
    #private;
    version: number;
    rootDir: Record<number, DataView>;
    dirCache: Cache<number, DataView<ArrayBufferLike>>;
    /** @param mapID - the id of the map we are fetching data for */
    build(mapID: string): Promise<void>;
    /**
     * Here, we use the memory mapped file directory tree system to find our data
     * @param mapID - the id of the map we are fetching data for
     * @param tile - the tile request
     * @param sourceName - the name of the source
     */
    _tileRequest(mapID: string, tile: TileRequest, sourceName: string): Promise<void>;
    /**
     * Get a range request
     * @param url - the base href to build a range request from
     * @param offset - the start of the range
     * @param length - the length of the range
     * @param mapID - the map id we are going to build render data for
     * @returns raw tile data or directory data
     */
    getRange(url: string, offset: number, length: number, mapID: string): Promise<undefined | ArrayBuffer | object>;
}
