"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRecommendedTemplatesCatalog = void 0;
const wellKnownCatalog_1 = require("../../search/wellKnownCatalog");
const getRecommendedTemplatesCatalog = (user, i18nScope) => {
    const catalogNames = ["myContent", "organization"];
    const catalogs = catalogNames.map((name) => {
        const opts = { user };
        const catalog = (0, wellKnownCatalog_1.getWellKnownCatalog)("initiativeTemplate.fields.recommendedTemplates", name, "item", opts);
        // manually attach recommended templates collection
        catalog.collections = [getRecommendedTemplatesCollection(i18nScope)];
        return catalog;
    });
    return catalogs;
};
exports.getRecommendedTemplatesCatalog = getRecommendedTemplatesCatalog;
const getRecommendedTemplatesCollection = (i18nScope) => {
    return {
        targetEntity: "item",
        key: "recommendedTemplates",
        label: `${i18nScope}.fields.recommendedTemplates.collection.label`,
        scope: {
            targetEntity: "item",
            filters: [
                {
                    predicates: [
                        {
                            type: "Solution",
                        },
                    ],
                },
                {
                    predicates: [
                        {
                            typekeywords: ["hubSolutionTemplate"],
                        },
                        {
                            typekeywords: ["Template"],
                        },
                    ],
                    operation: "OR",
                },
            ],
        },
    };
};
//# sourceMappingURL=getRecommendedTemplatesCatalog.js.map