import { Configuration as WebpackConfig } from "webpack";
import { PulumiAppModule } from "@webiny/pulumi";
import { Unwrap } from "@pulumi/pulumi";
export interface RunCommandOptions {
    cwd: string;
    command: string;
    env: string;
    variant: string;
    [key: string]: any;
}
export interface ReactAppConfigCustomizerParams {
    options: RunCommandOptions;
    config: ReactAppConfig;
}
export interface ReactAppConfigModifier {
    (params: ReactAppConfigCustomizerParams): void;
}
export interface ReactAppFactoryParams {
    options: RunCommandOptions;
}
export interface ReactAppCommands {
    [key: string]: () => Promise<any>;
}
export interface ReactAppCommandsModifier {
    (commands: ReactAppCommands): ReactAppCommands;
}
export interface ReactAppFactory {
    (params: ReactAppFactoryParams): {
        commands: ReactAppCommands;
    };
}
export interface BabelConfig {
    [key: string]: any;
}
export interface BabelConfigModifier {
    (config: BabelConfig): BabelConfig;
}
export interface WebpackConfigModifier {
    (config: WebpackConfig): WebpackConfig;
}
export interface EntryModifier {
    (entry: string): string;
}
export interface ReactAppEnv {
    [key: string]: string | number | boolean | undefined | string[] | number[];
}
export interface ReactAppEnvMap {
    [key: string]: string;
}
export interface CustomEnvModifier {
    (env: ReactAppEnv): ReactAppEnv;
}
export type PulumiOutput = PulumiAppModule<any>;
export interface PulumiOutputToEnvModifierParams<T extends PulumiOutput> {
    output: Unwrap<T>;
    env: ReactAppEnv;
}
export interface PulumiOutputToEnvModifier<T extends PulumiOutput = PulumiOutput> {
    (params: PulumiOutputToEnvModifierParams<T>): ReactAppEnv;
}
export interface ReactAppConfig {
    seal(): {
        commands: ReactAppCommands;
    };
    webpack(modifier: WebpackConfigModifier): void;
    babel(modifier: BabelConfigModifier): void;
    entry(modifier: EntryModifier): void;
    customEnv(modifier: CustomEnvModifier): void;
    commands(commands: ReactAppCommandsModifier): void;
    pulumiOutputToEnv<T extends PulumiOutput>(app: `apps/${string}`, modifier: ReactAppEnvMap | PulumiOutputToEnvModifier<T>): void;
}
export interface Overrides {
    entry: string;
    openBrowser?: boolean;
    webpack: (config: WebpackConfig) => WebpackConfig;
    babel: (config: BabelConfig) => BabelConfig;
}
export declare function createReactAppConfig(customizer?: ReactAppConfigModifier): ReactAppFactory;
