import { IAssetOptimizer } from "./i-asset-optimizer";
import { IFileTypeDetector } from "./file-type-detector/i-file-type-detector";
import { IFileLoader } from "@wessberg/fileloader";
import { IFoveaCliAssetConfig } from "../fovea-cli-config/i-fovea-cli-config";
import { IImageOptimizer } from "./image-optimizer/i-image-optimizer";
import { IAssetOptimizerOptimizeOptions } from "./i-asset-optimizer-optimize-options";
import { IBuildLogger } from "../build-debugger/i-build-logger";
import { IAssetOptimizerOptimizeDirectoryOptions } from "./i-asset-optimizer-optimize-directory-options";
import { IScriptOptimizer } from "./script-optimizer/i-script-optimizer";
/**
 * A service that helps with optimizing assets
 */
export declare class AssetOptimizer implements IAssetOptimizer {
    private readonly imageOptimizer;
    private readonly scriptOptimizer;
    private readonly fileTypeDetector;
    private readonly fileLoader;
    private readonly buildLogger;
    constructor(imageOptimizer: IImageOptimizer, scriptOptimizer: IScriptOptimizer, fileTypeDetector: IFileTypeDetector, fileLoader: IFileLoader, buildLogger: IBuildLogger);
    /**
     * Optimizes the asset with the given paths
     * @param {IAssetOptimizerOptimizeOptions} options
     * @returns {Promise<Buffer>}
     */
    optimize(options: IAssetOptimizerOptimizeOptions): Promise<Buffer>;
    /**
     * Optimizes all assets within the provided directory
     * @param {string} directory
     * @param {IAssetOptimizerOptions} options,
     * @param {Iterable<string>} [exclude=[]]
     * @returns {Promise<object>}
     */
    optimizeDirectory({directory, options, exclude}: IAssetOptimizerOptimizeDirectoryOptions): Promise<{
        [key: string]: Buffer;
    }>;
    /**
     * Generates app icons from the app icon on the given paths
     * @param {IFoveaCliAssetConfig} config
     * @returns {Promise<object>}
     */
    generateAppIcons({appIcon, optimization}: IFoveaCliAssetConfig): Promise<{
        [key: string]: Buffer;
    }>;
    /**
     * Detects the FileFormatKind from the given Buffer and options
     * @param {IAssetOptimizerOptimizeOptions} options
     * @returns {FileFormatKind}
     */
    private detectFileFormatKind(options);
    /**
     * Runs the given buffer with the given options through all image optimizers until one of them can handle it
     * @param {IAssetOptimizerOptimizeOptions} options
     * @param {ImageFormatKind} outputFormat
     * @returns {Promise<Buffer>}
     */
    private runImageOptimizer(options, outputFormat);
    /**
     * Runs the given buffer with the given options through all script optimizers until one of them can handle it
     * @param {IAssetOptimizerOptimizeOptions} options
     * @param {ScriptFormatKind} outputFormat
     * @returns {Promise<Buffer>}
     */
    private runScriptOptimizer(options, outputFormat);
    /**
     * Returns true if the given kind is an ImageFormatKind
     * @param {FileFormatKind} kind
     * @returns {boolean}
     */
    private isImageFormatKind(kind);
    /**
     * Returns true if the given kind is a ScriptFormatKind
     * @param {FileFormatKind} kind
     * @returns {boolean}
     */
    private isScriptFormatKind(kind);
}
