/// <reference types="node" />
import Jimp from "jimp";
import * as luaparse from "luaparse";
import { MapInfo, SMD, SMF, SpringMap, WaterOptions } from "./map-model";
export interface MapParserConfig {
    verbose: boolean;
    /**
     * Resolution of tile mipmaps. Can be 4, 8, 16 or 32. Each higher mipmap level doubles the final output resolution, and also resource usage.
     * @default 4
     * */
    mipmapSize: 4 | 8 | 16 | 32;
    /**
     * If you don't want textureMap, set this to true to speed up parsing.
     * @default false
     */
    skipSmt: boolean;
    /**
     * Path to the 7za executable. Will automatically resolve if left unspecified.
     * @default sevenBin.path7za
     */
    path7za: string;
    /**
     * Retroactively draw water on top of map texture based on the map's depth
     * @default true
     */
    water: boolean;
    /**
     * Parse specular map from the archive
     * @default flase
     */
    parseSpecular: boolean;
}
export declare class MapParser {
    protected config: MapParserConfig;
    constructor(config?: Partial<MapParserConfig>);
    parseMap(mapFilePath: string): Promise<SpringMap>;
    protected extractSd7(sd7Path: string, outPath: string): Promise<{
        smf: Buffer;
        smt: Buffer;
        smd?: Buffer;
        smfName?: string;
        mapInfo?: Buffer;
        specular?: Jimp;
    }>;
    protected extractSdz(sdzPath: string, outPath: string): Promise<{
        smf: Buffer;
        smt: Buffer;
        smd?: Buffer;
        smfName?: string;
        mapInfo?: Buffer;
        specular?: Jimp;
    }>;
    protected extractArchiveFiles(outPath: string): Promise<{
        smf: Buffer;
        smt: Buffer;
        smd: Buffer | undefined;
        smfName: string | undefined;
        mapInfo: Buffer | undefined;
        specular: Jimp | undefined;
    }>;
    protected parseSMF(smfBuffer: Buffer): Promise<SMF>;
    protected parseSMT(smtBuffer: Buffer, tileIndexes: number[], mapWidthUnits: number, mapHeightUnits: number, mipmapSize: 4 | 8 | 16 | 32): Promise<Jimp>;
    protected parseMapInfo(buffer: Buffer): Promise<MapInfo>;
    protected parseMapInfoFields(fields: (luaparse.TableKey | luaparse.TableKeyString | luaparse.TableValue)[]): any;
    protected parseSMD(buffer: Buffer): Promise<SMD>;
    protected cloneTile(tile: Buffer[]): Buffer[];
    protected joinTilesHorizontally(tiles: Buffer[][], mipmapSize: 4 | 8 | 16 | 32): Buffer;
    protected applyWater(options: WaterOptions): void;
    protected cleanup(tmpDir: string): Promise<void>;
    protected sigint(tmpDir: string): Promise<void>;
}
