"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getUseComponents = void 0;
const core_1 = require("@angular-devkit/core");
const const_1 = require("./const");
const get_library_path_1 = require("./get-library-path");
function getUseComponents(libraryPath, localPath, moduleId) {
    const list = [...libraryPath];
    list.push(...localPath.map((item) => {
        item.path = (0, get_library_path_1.getComponentOutputPath)(moduleId, item.className);
        return item;
    }));
    return list.reduce((pre, cur) => {
        pre[cur.selector] = (0, core_1.resolve)((0, core_1.normalize)('/'), (0, core_1.join)((0, core_1.normalize)(const_1.LIBRARY_OUTPUT_ROOTDIR), cur.path));
        return pre;
    }, {});
}
exports.getUseComponents = getUseComponents;
