import { Es2pandaContextState } from '../../generated/Es2pandaEnums';
import { ETSModule, Program } from '../../generated';
import { KNativePointer } from '@koalaui/interop';
export interface CompilationOptions {
    readonly isProgramForCodegeneration: boolean;
    readonly state: Es2pandaContextState;
}
export interface DependentModuleConfig {
    packageName: string;
    moduleName: string;
    moduleType: string;
    modulePath: string;
    sourceRoots: string[];
    entryFile: string;
    language: string;
    declFilesPath?: string;
    dependencies?: string[];
}
export interface ProjectConfig {
    bundleName: string;
    moduleName: string;
    cachePath: string;
    dependentModuleList: DependentModuleConfig[];
    appResource: string;
    rawFileResource: string;
    buildLoaderJson: string;
    hspResourcesMap: boolean;
    compileHar: boolean;
    byteCodeHar: boolean;
    uiTransformOptimization: boolean;
    resetBundleName: boolean;
    allowEmptyBundleName: boolean;
    moduleType: string;
    moduleRootPath: string;
    aceModuleJsonPath: string;
    ignoreError: boolean;
    projectPath: string;
    projectRootPath: string;
    integratedHsp: boolean;
    frameworkMode?: string;
    isUi2abc?: boolean;
    memoPluginOptions?: Object;
    uiPluginOptions?: Object;
}
export interface PluginContextBase {
    setParameter<V>(name: string, value: V): void;
    parameter<V>(name: string): V | undefined;
}
export interface PluginContext extends PluginContextBase {
    /**
     * @deprecated
     */
    setArkTSProgram(program: Program): void;
    /**
     * @deprecated
     */
    getArkTSProgram(): Program | undefined;
    setCodingFilePath(codingFilePath: string): void;
    getCodingFilePath(): string | undefined;
    isCoding(): boolean;
    getProjectConfig(): ProjectConfig | undefined;
}
export declare class PluginContextBaseImpl implements PluginContextBase {
    map: Map<string, object | undefined>;
    parameter<V>(name: string): V | undefined;
    setParameter<V>(name: string, value: V): void;
}
export declare function extendPluginContext(context: PluginContextImpl): void;
export declare class PluginContextImpl extends PluginContextBaseImpl implements PluginContext {
    private ast;
    private projectConfig;
    private program;
    private codingFilePath;
    setContextPtr(ptr: KNativePointer): void;
    getContextPtr(): KNativePointer;
    setProjectConfig(projectConfig: ProjectConfig): void;
    getProjectConfig(): ProjectConfig | undefined;
    /**
     * @deprecated
     */
    setArkTSAst(ast: ETSModule): void;
    /**
     * @deprecated
     */
    getArkTSAst(): ETSModule | undefined;
    /**
     * @deprecated
     */
    setArkTSProgram(program: Program): void;
    /**ProjectConfig
     * @deprecated
     */
    getArkTSProgram(): Program | undefined;
    setCodingFilePath(codingFilePath: string): void;
    getCodingFilePath(): string | undefined;
    isCoding(): boolean;
}
export type PluginHandlerFunction = () => void;
export type PluginHandlerObject = {
    order: 'pre' | 'post' | undefined;
    handler: PluginHandlerFunction;
};
export type PluginHandler = PluginHandlerFunction | PluginHandlerObject;
export type ProgramTransformer = (program: Program, compilationOptions: CompilationOptions, context: PluginContext) => void;
export interface Plugins {
    name: string;
    afterNew?: PluginHandler;
    parsed?: PluginHandler;
    scopeInited?: PluginHandler;
    checked?: PluginHandler;
    lowered?: PluginHandler;
    asmGenerated?: PluginHandler;
    binGenerated?: PluginHandler;
    clean?: PluginHandler;
}
export type PluginState = keyof Omit<Plugins, 'name'>;
export type PluginExecutor = {
    name: string;
    handler: PluginHandlerFunction;
};
export interface BuildConfig {
    compileFiles: string[];
}
export declare function defaultFilter(name: string): boolean;
export declare function listPrograms(program: Program, filter?: (name: string) => boolean): readonly Program[];
