import { Tree } from '@nx/devkit';
export interface UnisphereConfig {
    company: string;
    name: string;
    runtimes: Record<string, {
        sourceRoot: string;
        visuals: string[];
    }>;
}
export declare function validateUnisphereConfig(tree: Tree): UnisphereConfig;
export declare function updateTsConfigPaths(tree: Tree, pathKey: string, pathValue: string): void;
export declare function validateElementNameUnique(tree: Tree, elementName: string, targetType: 'packages' | 'runtimes' | 'applications' | 'documentation'): void;
export declare function updateUnisphereConfig(tree: Tree, elementType: 'packages' | 'runtimes' | 'applications' | 'documentation', elementName: string, elementConfig: Record<string, any>): void;
export declare function validateRuntimeExists(tree: Tree, runtimeName: string): string;
export declare function findCorePackageAlias(tree: Tree): string;
/**
 * Tries to find the types package alias in tsconfig.base.json
 * Returns null if types package is not found
 */
export declare function findTypesPackageAlias(tree: Tree): string | null;
export interface TypesPackageInfo {
    /** The tsconfig alias for the package (e.g., "@mycompany/types" or "@mycompany/core") */
    alias: string;
    /** The base path to the package (e.g., "unisphere/packages/types" or "unisphere/packages/public/core") */
    basePath: string;
    /** Whether the types package exists (true) or falling back to core (false) */
    hasTypesPackage: boolean;
}
/**
 * Finds the types package if it exists, otherwise falls back to core package.
 * Returns info about which package to use for runtime types.
 */
export declare function findTypesOrCorePackageInfo(tree: Tree): TypesPackageInfo;
type NameTransformations<Prefix extends string> = {
    [K in `${Prefix}` | `${Prefix}__lowerDashCase` | `${Prefix}__camelCase` | `${Prefix}__pascalCase` | `${Prefix}__constantCase` | `${Prefix}__humanReadable`]: string;
};
export declare function createNameTransforms<Prefix extends string>(baseName: string, prefix: Prefix): NameTransformations<Prefix>;
export declare function isPackageInstalled(tree: Tree, packageName: string): string | false;
export declare function checkIfRuntimeExists(tree: Tree, runtimeName: string): boolean;
/**
 * Maps package scope to subdirectory name
 * @param scope - The package scope ('public', 'internal', 'none')
 * @returns The subdirectory name ('unisphere', 'kaltura-corp', 'local')
 */
export declare function getSubdirectoryFromScope(scope: 'unisphere' | 'kaltura-corp' | 'local' | 'kaltura-ui' | 'kaltura-apps' | 'kaltura-sdk'): string;
/**
 * Extracts the subdirectory from a package sourceRoot path
 * @param sourceRoot - The sourceRoot path (e.g., "unisphere/packages/kaltura-corp/shared")
 * @returns The subdirectory name ('unisphere', 'kaltura-corp', 'local') or null if flat structure
 */
export declare function extractSubdirectoryFromSourceRoot(sourceRoot: string): string | null;
/**
 * Extracts the package name from a package sourceRoot path
 * @param sourceRoot - The sourceRoot path (e.g., "unisphere/packages/corp/shared" or "unisphere/packages/shared")
 * @returns The package name
 */
export declare function extractPackageNameFromSourceRoot(sourceRoot: string): string;
/**
 * Adds a script to the root package.json
 * @param tree - The file system tree
 * @param scriptName - The name of the script (e.g., "dev:my-app")
 * @param scriptCommand - The command to run (e.g., "npx unisphere application serve my-app --port 4002")
 */
export declare function addScriptToRootPackageJson(tree: Tree, scriptName: string, scriptCommand: string): void;
export declare function extractApplicationSubdirectory(sourceRoot: string): string | null;
export declare function renameScriptInRootPackageJson(tree: Tree, oldScriptName: string, newScriptName: string, newScriptCommand: string): void;
export {};
//# sourceMappingURL=utils.d.ts.map