import { Harmony } from '@teambit/harmony';
import { AspectLoaderMain } from '@teambit/aspect-loader';
import { LoggerMain } from '@teambit/logger';
import { BuilderMain } from '@teambit/builder';
import { DependencyResolverMain, EnvPolicyConfigObject } from '@teambit/dependency-resolver';
import { CLIMain } from '@teambit/cli';
import { Environment, EnvsMain, EnvTransformer } from '@teambit/envs';
import { ReactMain } from '@teambit/react';
import { GeneratorMain } from '@teambit/generator';
import { ComponentID } from '@teambit/component-id';
import { AspectList } from '@teambit/component';
import { WorkerMain } from '@teambit/worker';
import { ExtensionsOrigin, Workspace } from '@teambit/workspace';
import { CompilerMain } from '@teambit/compiler';
import { AspectEnv } from './aspect.env';
import { SetAspectOptions } from './aspect.cmd';
import { DevFilesMain } from '@teambit/dev-files';
import { ExtensionDataList, ValidateBeforePersistResult } from '@teambit/legacy.extension-data';
export type AspectSource = {
    aspectName: string;
    source: string;
    level: string;
};
export declare class AspectMain {
    readonly aspectEnv: AspectEnv;
    private envs;
    private workspace;
    private aspectLoader;
    private depsResolver;
    constructor(aspectEnv: AspectEnv, envs: EnvsMain, workspace: Workspace, aspectLoader: AspectLoaderMain, depsResolver: DependencyResolverMain);
    /**
     * compose your own aspect environment.
     */
    compose(transformers?: EnvTransformer[], targetEnv?: Environment): Environment;
    listAspectsOfComponent(pattern?: string): Promise<{
        [component: string]: AspectSource[];
    }>;
    listCoreAspects(): string[];
    get babelConfig(): {
        presets: (string | (string | {
            targets: {
                node: number;
            };
        })[])[];
        plugins: (string | (string | {
            lazy: () => boolean;
        })[] | (string | {
            legacy: boolean;
        })[])[];
        sourceMaps: boolean;
    };
    private getAspectNamesForComponent;
    private getLevelBySourceOrigin;
    setAspectsToComponents(pattern: string, aspectId: string, config?: Record<string, any>, options?: SetAspectOptions): Promise<ComponentID[]>;
    unsetAspectsFromComponents(pattern: string, aspectIdStr: string): Promise<ComponentID[]>;
    /**
     * returns all aspects info of a component, include the config and the data.
     */
    getAspectsOfComponent(id: string | ComponentID): Promise<AspectList>;
    /**
     * helps debugging why/how an aspect was set to a component
     */
    getAspectsOfComponentForDebugging(id: string | ComponentID): Promise<{
        aspects: AspectList;
        extensions: ExtensionDataList;
        beforeMerge: {
            extensions: ExtensionDataList;
            origin: ExtensionsOrigin;
            extraData: any;
        }[];
    }>;
    updateAspectsToComponents(aspectId: string, pattern?: string): Promise<{
        updated: ComponentID[];
        alreadyUpToDate: ComponentID[];
    }>;
    /**
     * override the dependency configuration of the component environment.
     */
    overrideDependencies(dependencyPolicy: EnvPolicyConfigObject): EnvTransformer;
    /**
     * currently, it validates envs/envs only. If needed for other aspects, create a slot, let aspects register to it,
     * then call the validation of all aspects from here.
     */
    validateAspectsBeforePersist(extensionDataList: ExtensionDataList): ValidateBeforePersistResult;
    static runtime: import("@teambit/harmony").RuntimeDefinition;
    static dependencies: import("@teambit/harmony").Aspect[];
    static provider([react, envs, builder, aspectLoader, compiler, generator, workspace, cli, loggerMain, workerMain, devFilesMain, depResolver]: [
        ReactMain,
        EnvsMain,
        BuilderMain,
        AspectLoaderMain,
        CompilerMain,
        GeneratorMain,
        Workspace,
        CLIMain,
        LoggerMain,
        WorkerMain,
        DevFilesMain,
        DependencyResolverMain
    ], config: any, slots: any, harmony: Harmony): Promise<AspectMain>;
}
