import { ImportDeclaration } from "@babel/types";
import type { Options } from "prettier";
import { CodeComponentConfig, ComponentConfig, CustomFunctionConfig, GlobalVariantGroupConfig, IconConfig, ImageConfig, PlasmicConfig, PlasmicContext, ProjectConfig } from "./config-utils";
export declare function formatAsLocal(content: string, filePath: string, baseDir: string, defaultOpts?: Options): Promise<string>;
export declare function ensureImportSpecifierWithAlias(decl: ImportDeclaration, imported: string, alias: string): void;
export declare function ensureImportDefaultSpecifier(decl: ImportDeclaration, defaultExport: string): void;
/**
 * Given the argument `code` string, for module at `fromPath`, replaces all Plasmic imports
 * for modules found in `compConfigsMap`.
 */
export declare function replaceImports(context: PlasmicContext, code: string, fromPath: string, fixImportContext: FixImportContext, removeImportDirective: boolean, baseDir: string, changed?: boolean): Promise<string>;
/**
 * Returns true if the argument ComponentConfig.importSpec.modulePath is referencing
 * a local file
 */
export declare function isLocalModulePath(modulePath: string): boolean;
export interface ComponentUpdateSummary {
    skeletonModuleModified: boolean;
}
export interface FixImportContext {
    config: PlasmicConfig;
    components: Record<string, ComponentConfig>;
    codeComponentMetas: Record<string, CodeComponentConfig>;
    customFunctionMetas: Record<string, CustomFunctionConfig>;
    globalVariants: Record<string, GlobalVariantGroupConfig>;
    icons: Record<string, IconConfig>;
    images: Record<string, ImageConfig>;
    projects: Record<string, ProjectConfig>;
}
export declare const mkFixImportContext: (config: PlasmicConfig) => FixImportContext;
/**
 * Assuming that all the files referenced in PlasmicConfig are correct, fixes import statements using PlasmicConfig
 * file locations as the source of truth.
 */
export declare function fixAllImportStatements(context: PlasmicContext, baseDir: string, summary?: Map<string, ComponentUpdateSummary>): Promise<void>;
export declare const tsxToJsx: (code: string) => string;
export declare function maybeConvertTsxToJsx(fileName: string, content: string, baseDir: string): Promise<[string, string]>;
export declare function formatScript(code: string, baseDir: string): Promise<string>;
export declare function fixRscModulesImports(context: PlasmicContext, baseDir: string, fixImportContext: FixImportContext, compConfig: ComponentConfig): Promise<void>;
