import { join } from 'node:path';
import { getFirstPartyComponentCatalogEntry } from './componentCatalog.js';
import { resolveFirstPartyInstallLayout } from './installLayout.js';
export function resolveInstalledFirstPartyComponentPaths(params) {
    const layout = resolveFirstPartyInstallLayout({
        componentId: params.componentId,
        channel: params.channel,
        releaseRing: params.releaseRing,
        processEnv: params.processEnv,
    });
    const component = getFirstPartyComponentCatalogEntry(params.componentId);
    return {
        installRoot: layout.installRoot,
        currentPath: layout.currentPath,
        previousPath: layout.previousPath,
        versionsDir: layout.versionsDir,
        binaryPath: join(layout.currentPath, component.binaryRelativePath),
        nodeEntrypointPath: component.nodeEntrypointRelativePath
            ? join(layout.currentPath, component.nodeEntrypointRelativePath)
            : null,
        shimPaths: layout.installShims.map((shimName) => join(layout.shimDir, shimName)),
    };
}
//# sourceMappingURL=resolveInstalledComponentPaths.js.map