import type { DevFilesMain } from '@teambit/dev-files';
import type { Harmony } from '@teambit/harmony';
import type { CompilerMain, Compiler } from '@teambit/compiler';
import type { BuildTask } from '@teambit/builder';
import type { Component } from '@teambit/component';
import type { EnvsMain, EnvTransformer, Environment } from '@teambit/envs';
import type { GraphqlMain } from '@teambit/graphql';
import type { PkgMain, PackageJsonProps } from '@teambit/pkg';
import type { SchemaMain } from '@teambit/schema';
import type { TesterMain } from '@teambit/tester';
import type { TypescriptMain, TsCompilerOptionsWithoutTsConfig, TsConfigTransformer } from '@teambit/typescript';
import type { WebpackMain, Configuration, WebpackConfigTransformer } from '@teambit/webpack';
import type { GeneratorMain } from '@teambit/generator';
import type { Workspace } from '@teambit/workspace';
import type { DependencyResolverMain, EnvPolicyConfigObject } from '@teambit/dependency-resolver';
import type { ApplicationMain } from '@teambit/application';
import type { Logger, LoggerMain } from '@teambit/logger';
import type { EslintConfigTransformer } from '@teambit/defender.eslint.config-mutator';
import type { WorkerMain } from '@teambit/worker';
import { ReactEnv } from './react.env';
import { ReactAppType } from './apps/web';
import type { ReactAppOptions } from './apps/web/react-app-options';
import type { PrettierConfigTransformer } from '@teambit/defender.prettier.config-mutator';
type ReactDeps = [
    EnvsMain,
    TypescriptMain,
    CompilerMain,
    WebpackMain,
    Workspace,
    GraphqlMain,
    PkgMain,
    TesterMain,
    ApplicationMain,
    GeneratorMain,
    DependencyResolverMain,
    LoggerMain,
    SchemaMain,
    WorkerMain,
    DevFilesMain
];
export type ReactMainConfig = {
    /**
     * configure the react env compiler.
     * can be configured to either TypeScript ('ts') or Babel ('babel').
     */
    compiler: 'babel' | 'ts';
    /**
     * configure the component tester.
     * can be either Jest ('jest') or Mocha ('mocha')
     */
    tester: 'jest' | 'mocha';
    /**
     * version of React to configure.
     */
    reactVersion: string;
};
export type UseWebpackModifiers = {
    previewConfig?: WebpackConfigTransformer[];
    devServerConfig?: WebpackConfigTransformer[];
    webpackModulePath?: string;
    webpackDevServerModulePath?: string;
};
export type UseTypescriptModifiers = {
    buildConfig?: TsConfigTransformer[];
    devConfig?: TsConfigTransformer[];
};
export type UseEslintModifiers = {
    transformers: EslintConfigTransformer[];
};
export type UsePrettierModifiers = {
    transformers: PrettierConfigTransformer[];
};
export declare class ReactMain {
    /**
     * an instance of the React env.
     */
    readonly reactEnv: ReactEnv;
    private envs;
    private application;
    private reactAppType;
    private dependencyResolver;
    private logger;
    constructor(
    /**
     * an instance of the React env.
     */
    reactEnv: ReactEnv, envs: EnvsMain, application: ApplicationMain, reactAppType: ReactAppType, dependencyResolver: DependencyResolverMain, logger: Logger);
    readonly env: ReactEnv;
    getReactAppType(name: string): ReactAppType;
    /**
     * use this to register apps programmatically.
     */
    registerApp(reactApp: ReactAppOptions): Promise<ApplicationMain>;
    /**
     * override the env's typescript config for both dev and build time.
     * Replaces both overrideTsConfig (devConfig) and overrideBuildTsConfig (buildConfig)
     */
    useTypescript(modifiers?: UseTypescriptModifiers, tsModule?: any): EnvTransformer;
    /**
     * @deprecated use useTypescript()
     * override the TS config of the React environment.
     * @param tsModule typeof `ts` module instance.
     */
    overrideTsConfig(tsconfig?: Record<string, any>, compilerOptions?: Partial<TsCompilerOptionsWithoutTsConfig>, tsModule?: any): EnvTransformer;
    /**
     * Override the Bit documentation link. See docs: https://bit.dev/refrence/docs/doc-templates
     */
    overrideDocsTemplate(templatePath: string): EnvTransformer;
    /**
     * @deprecated use useTypescript()
     * override the build tsconfig.
     */
    overrideBuildTsConfig(tsconfig?: Record<string, any>, compilerOptions?: Partial<TsCompilerOptionsWithoutTsConfig>, tsModule?: any): EnvTransformer;
    /**
     * override the env's dev server and preview webpack configurations.
     * Replaces both overrideDevServerConfig and overridePreviewConfig
     */
    useWebpack(modifiers?: UseWebpackModifiers): EnvTransformer;
    /**
     * An API to mutate the prettier config
     * @param modifiers
     * @returns
     */
    useEslint(modifiers?: UseEslintModifiers): EnvTransformer;
    /**
     * An API to mutate the prettier config
     * @param modifiers
     * @returns
     */
    usePrettier(modifiers?: UsePrettierModifiers): EnvTransformer;
    /**
     * @deprecated use useWebpack()
     * override the dev server webpack config.
     */
    overrideDevServerConfig(config: Configuration): EnvTransformer;
    /**
     * @deprecated use useWebpack()
     * override the preview webpack config.
     */
    overridePreviewConfig(config: Configuration): EnvTransformer;
    overrideMounter(mounterPath: string): EnvTransformer;
    /**
     * create a new composition of the react environment.
     */
    compose(transformers: EnvTransformer[], targetEnv?: Environment): Environment;
    /**
     * override the jest configuration.
     * @param jestConfigPath {typeof jest} absolute path to jest.config.json.
     * @param jestModulePath absolute path to jest
     */
    overrideJestConfig(jestConfigPath: string, jestModulePath?: string): EnvTransformer;
    /**
     * override the build pipeline of the component environment.
     */
    overrideBuildPipe(tasks: BuildTask[]): EnvTransformer;
    /**
     * override the compiler tasks inside the build pipeline of the component environment.
     */
    overrideCompilerTasks(tasks: BuildTask[]): EnvTransformer;
    /**
     * override the dependency configuration of the component environment.
     */
    overrideDependencies(dependencyPolicy: EnvPolicyConfigObject): EnvTransformer;
    /**
     * override the workspace compiler.
     */
    overrideCompiler(compiler: Compiler): EnvTransformer;
    /**
     * TODO: @gilad we need to implement this.
     */
    overrideEslintConfig(): void;
    /**
     * override the package json props of the component environment.
     */
    overridePackageJsonProps(props: PackageJsonProps): EnvTransformer;
    /**
     * returns doc adjusted specifically for react components.
     */
    getDocs(component: Component): {
        abstract: any;
        filePath: any;
        properties: any;
    } | null;
    static runtime: import("@teambit/harmony").RuntimeDefinition;
    static dependencies: import("@teambit/harmony").Aspect[];
    static provider([envs, tsAspect, compiler, webpack, workspace, graphql, pkg, tester, application, generator, dependencyResolver, loggerMain, schemaMain, workerMain, devFilesMain,]: ReactDeps, config: ReactMainConfig, slots: any, harmony: Harmony): Promise<ReactMain>;
}
export {};
