import { IAssetOptimizerService } from "./i-asset-optimizer-service";
import { IFileTypeDetectorService } from "../file-type-detector/i-file-type-detector-service";
import { IImageOptimizer } from "./image-optimizer/i-image-optimizer";
import { IAssetOptimizerServiceOptimizeOptions } from "./i-asset-optimizer-service-optimize-options";
import { ILoggerService } from "../logger/i-logger-service";
import { IAssetOptimizerServiceOptimizeDirectoryOptions } from "./i-asset-optimizer-service-optimize-directory-options";
import { IScriptOptimizer } from "./script-optimizer/i-script-optimizer";
import { IAssetOptimizerServiceOptimizeDirectoryResult } from "./i-asset-optimizer-service-optimize-directory-result";
/**
 * A service that helps with optimizing assets
 */
export declare class AssetOptimizerService implements IAssetOptimizerService {
    private readonly imageOptimizer;
    private readonly scriptOptimizer;
    private readonly fileTypeDetector;
    private readonly buildLogger;
    constructor(imageOptimizer: IImageOptimizer, scriptOptimizer: IScriptOptimizer, fileTypeDetector: IFileTypeDetectorService, buildLogger: ILoggerService);
    /**
     * Optimizes the asset with the given paths
     * @param {IAssetOptimizerServiceOptimizeOptions} options
     * @returns {Promise<Buffer>}
     */
    optimize(options: IAssetOptimizerServiceOptimizeOptions): Promise<Buffer>;
    /**
     * Optimizes all assets within the provided map
     * @param {IAssetOptimizerServiceOptimizeDirectoryOptions} opts
     * @returns {Promise<IAssetOptimizerServiceOptimizeDirectoryResult>}
     */
    optimizeDirectory({assetMap, appIcon, options}: IAssetOptimizerServiceOptimizeDirectoryOptions): Promise<IAssetOptimizerServiceOptimizeDirectoryResult>;
    /**
     * Detects the FileFormatKind from the given Buffer and options
     * @param {IAssetOptimizerServiceOptimizeOptions} 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 {IAssetOptimizerServiceOptimizeOptions} options
     * @param {ImageFormatKind} outputFormat
     * @returns {Promise<Buffer>}
     */
    private runImageOptimizer({optimization, buffer, path}, outputFormat);
    /**
     * Runs the given buffer with the given options through all script optimizers until one of them can handle it
     * @param {IAssetOptimizerServiceOptimizeOptions} options
     * @param {ScriptFormatKind} outputFormat
     * @returns {Promise<Buffer>}
     */
    private runScriptOptimizer({path, buffer, optimization}, 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);
}
