import { IOLazyCanvas, LazyCanvas } from "../LazyCanvas";
import { AnyExport } from "../../types";
import { Canvas, SKRSContext2D, SvgCanvas } from "@napi-rs/canvas";
/**
 * Class responsible for exporting a LazyCanvas instance to various formats.
 */
export declare class Exporter {
    /**
     * The LazyCanvas instance to be exported.
     */
    canvas: LazyCanvas;
    /**
     * Constructs a new Exporter instance.
     * @param canvas {LazyCanvas} - The LazyCanvas instance to be exported.
     */
    constructor(canvas: LazyCanvas);
    /**
     * Saves a file to the filesystem.
     * @param {any} [buffer] - The data to be saved.
     * @param {Extensions} [extension] - The file extension.
     * @param {string} [name] - The name of the file (optional).
     * @throws {LazyError} If the buffer or extension is not provided.
     */
    private saveFile;
    /**
     * Exports all layers from the LayersManager as an array of JSON objects.
     * @param {LayersManager} [manager] - The LayersManager instance.
     * @returns {any[]} An array of JSON representations of the layers.
     */
    private exportLayers;
    /**
     * Exports the canvas to the specified format.
     * @param {AnyExport} [exportType] - The type of export (e.g., "png", "json").
     * @param {Object} [opts] - Optional settings.
     * @param {string} [opts.name] - The name of the file (optional).
     * @param {boolean} [opts.saveAsFile] - Whether to save the export as a file (optional).
     * @returns {Promise<Buffer | SKRSContext2D | Canvas | SvgCanvas | string>} The exported data.
     * @throws {LazyError} If the export type is not supported.
     */
    export(exportType: AnyExport, opts?: {
        name?: string;
        saveAsFile?: boolean;
    }): Promise<Buffer | SKRSContext2D | Canvas | SvgCanvas | string>;
    /**
     * Synchronously exports the canvas to the specified format.
     * @param {AnyExport} [exportType] - The type of export (e.g., "json").
     * @returns {IOLazyCanvas | void} The exported data or void if the export type is unsupported.
     */
    syncExport(exportType: AnyExport): IOLazyCanvas | void;
}
