"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TransientWebSiteService = void 0;
const tslib_1 = require("tslib");
const core_1 = require("@loopback/core");
const lodash_1 = require("lodash");
const models_1 = require("../../models");
const services_1 = require("../../services");
const inside_rest_service_1 = require("./../../services/inside-rest/inside-rest.service");
const transient_uri_reference_service_1 = require("./../../services/inside-rest/transient-uri-reference.service");
const object_node_service_1 = require("./../../services/object-node/object-node.service");
const object_tree_service_1 = require("./../../services/object-tree/object-tree.service");
const transient_entity_service_1 = require("./../../services/transient-entity/transient-entity.service");
const uri_complete_service_1 = require("./../../services/uri-complete/uri-complete.service");
const transient_content_generic_service_1 = require("./../content-generic-template/transient-content-generic.service");
const web_site_const_1 = require("./web-site.const");
const web_site_service_1 = require("./web-site.service");
let TransientWebSiteService = class TransientWebSiteService {
    constructor(transientEntityService, insideRestService, objectNodeService, objectTypeService, uriCompleteService, transientUriReferenceService, transientContentGenericService, objectTreeService, webSiteService) {
        this.transientEntityService = transientEntityService;
        this.insideRestService = insideRestService;
        this.objectNodeService = objectNodeService;
        this.objectTypeService = objectTypeService;
        this.uriCompleteService = uriCompleteService;
        this.transientUriReferenceService = transientUriReferenceService;
        this.transientContentGenericService = transientContentGenericService;
        this.objectTreeService = objectTreeService;
        this.webSiteService = webSiteService;
        this.transientEntityService.registerTransientEntityTypeFunction(web_site_const_1.WEB_SITE_PROVIDER, TransientWebSiteService.name, 'Add welcomePage Id and Uri', models_1.EntityName.objectTree, web_site_const_1.WEB_SITE_VIEW_TYPE.name, this.completeWebSiteViewTree.bind(this));
        this.transientEntityService.registerTransientEntityTypeFunction(web_site_const_1.WEB_SITE_PROVIDER, TransientWebSiteService.name, 'Complete menuEntries json schema definition with menuEntries from referenced template', models_1.EntityName.objectNode, web_site_const_1.WEB_SITE_MENU_ENTRIES_TYPE.name, this.completeWebSiteMenuEntriesNode.bind(this));
        this.transientEntityService.registerTransientEntityTypeFunction(web_site_const_1.WEB_SITE_PROVIDER, TransientWebSiteService.name, 'Add menuEntriesList, tree of site menu entries', models_1.EntityName.objectNode, web_site_const_1.WEB_SITE_MENU_ENTRIES_TYPE.name, this.completeWebSiteMenuEntriesNode2.bind(this));
        this.transientEntityService.registerTransientEntityTypeFunction(web_site_const_1.WEB_SITE_PROVIDER, TransientWebSiteService.name, 
        //  'Complete pageTemplateChoice json schema definition with pageTemplateChoice from referenced template and add its conditional page template configuration',
        'Complete pageTemplateChoice json schema definition with pageTemplateChoice from referenced template and add templateConfigurations', models_1.EntityName.objectNode, web_site_const_1.PAGE_WITH_TEMPLATE_CHOICE.name, this.completePageWithTemplateChoiceNode.bind(this));
        this.transientEntityService.registerTransientEntityTypeFunction(web_site_const_1.WEB_SITE_PROVIDER, TransientWebSiteService.name, 
        //      'Complete paragraphsTemplateChoice json schema definition with paragraphsTemplateChoice from referenced template and add its conditional paragraph template configuration',
        'Complete paragraphsTemplateChoice json schema definition with paragraphsTemplateChoice from referenced template and add templateConfigurations', models_1.EntityName.objectNode, web_site_const_1.PARAGRAPH_WITH_TEMPLATE_CHOICE_TYPE.name, this.completeParagraphWithTemplateChoiceNode.bind(this));
        /*
        this.transientEntityService.registerTransientEntityTypeFunction(
          WEB_SITE_PROVIDER,
          TransientWebSiteService.name,
          'Add new page template configuration json schema definitions, configuration from new added referenced templates',
          EntityName.objectNode,
          WEB_SITE_WITH_PAGES_TEMPLATE_TYPE.name,
          this.completeWebSiteWithPagesTemplateNode.bind(this),
        );
        */
        /*
        this.transientEntityService.registerTransientEntityTypeFunction(
          WEB_SITE_PROVIDER,
          TransientWebSiteService.name,
          'Add new paragraph template configuration json schema definitions, configuration from new added referenced templates',
          EntityName.objectNode,
          WEB_SITE_WITH_PARAGRAPHS_TEMPLATE_TYPE.name,
          this.completeWebSiteWithParagraphsTemplateNode.bind(this),
        );
    */
        this.transientEntityService.registerTransientEntityTypeFunction(web_site_const_1.WEB_SITE_PROVIDER, TransientWebSiteService.name, 'Add pageNodes field, list of sub-pages', models_1.EntityName.objectNode, web_site_const_1.PAGE_WITH_SUB_PAGE_TYPE.name, this.completePageWithSubPageNode.bind(this));
        this.transientEntityService.registerTransientEntityTypeFunction(web_site_const_1.WEB_SITE_PROVIDER, TransientWebSiteService.name, 'Add pageId and siteId', models_1.EntityName.objectNode, web_site_const_1.PAGE_TYPE.name, this.completePageNode.bind(this));
        this.transientEntityService.registerTransientEntityTypeFunction(web_site_const_1.WEB_SITE_PROVIDER, TransientWebSiteService.name, 'Add reference to a parent page', models_1.EntityName.objectTree, web_site_const_1.PAGE_TYPE.name, this.completePageTree.bind(this));
        this.transientEntityService.registerTransientEntityTypeFunction(web_site_const_1.WEB_SITE_PROVIDER, TransientWebSiteService.name, 'Add paragraphNodes field, list of paragraphs', models_1.EntityName.objectNode, web_site_const_1.PAGE_WITH_PARAGRAPH_TYPE.name, this.completePageWithParagraphNode.bind(this));
        this.transientEntityService.registerTransientEntityTypeFunction(web_site_const_1.WEB_SITE_PROVIDER, TransientWebSiteService.name, 'Add paragraphNodes field, list of paragraphs', models_1.EntityName.objectNode, web_site_const_1.PARAGRAPH_CONTAINER_TYPE.name, this.completeParagraphContainerNode.bind(this));
    }
    addTemplatesConfigurationsReferences(objectNode) {
        if (objectNode.templatesConfigurations) {
            if (!objectNode.templatesConfigurations.id) {
                objectNode.templatesConfigurations.id =
                    objectNode.id + '/templatesConfigurations';
            }
            if (!objectNode.templatesConfigurations.entityCtx) {
                objectNode.templatesConfigurations.entityCtx = {
                    entityType: models_1.EntityName.objectNode,
                };
            }
            for (const configurationName of Object.keys(objectNode.templatesConfigurations)) {
                if (lodash_1.isObject(objectNode.templatesConfigurations[configurationName])) {
                    if (!objectNode.templatesConfigurations[configurationName].id) {
                        objectNode.templatesConfigurations[configurationName].id =
                            objectNode.id + '/templatesConfigurations/' + configurationName;
                    }
                    if (!objectNode.templatesConfigurations[configurationName].entityCtx) {
                        objectNode.templatesConfigurations[configurationName].entityCtx = {
                            entityType: models_1.EntityName.objectNode,
                        };
                    }
                }
            }
        }
    }
    addTemplatesConfigurations(objectNode, templatesConfigurations) {
        if (!objectNode.templatesConfigurations) {
            objectNode.templatesConfigurations = {};
        }
        lodash_1.merge(objectNode.templatesConfigurations, templatesConfigurations);
        this.addTemplatesConfigurationsReferences(objectNode);
    }
    async completeWebSiteViewTree(webSiteViewTree, ctx) {
        const childrenByType = await this.objectTreeService.getChildrenByImplementedTypeId(webSiteViewTree);
        if (childrenByType[web_site_const_1.WELCOME_PAGE_TYPE.name] &&
            0 < childrenByType[web_site_const_1.WELCOME_PAGE_TYPE.name].length) {
            webSiteViewTree.welcomePageId =
                childrenByType[web_site_const_1.WELCOME_PAGE_TYPE.name][0].id;
            webSiteViewTree.welcomePageUri =
                childrenByType[web_site_const_1.WELCOME_PAGE_TYPE.name][0].uri;
        }
        if (childrenByType[web_site_const_1.WEB_SITE_LAYOUT_TYPE.name] &&
            0 < childrenByType[web_site_const_1.WEB_SITE_LAYOUT_TYPE.name].length) {
            webSiteViewTree.layout = childrenByType[web_site_const_1.WEB_SITE_LAYOUT_TYPE.name][0];
        }
    }
    async completeWebSiteMenuEntriesNode2(webSiteMenuEntriesNode, ctx) {
        webSiteMenuEntriesNode.menuEntriesList = {
            entityCtx: webSiteMenuEntriesNode.entityCtx,
            uri: webSiteMenuEntriesNode.uri + '/menuEntries',
            id: webSiteMenuEntriesNode.id + '/menuEntries',
        };
        try {
            const webSiteTree = (await this.insideRestService.read(webSiteMenuEntriesNode.webSiteObjectTreeUri, ctx));
            const webSiteMenuEntriesTree = (await this.insideRestService.read(this.uriCompleteService.getUri(models_1.EntityName.objectTree, webSiteMenuEntriesNode.id, ctx), ctx));
            if (webSiteMenuEntriesNode.menuEntries) {
                for (const menuEntry of webSiteTree.treeNode.menuEntries) {
                    if (webSiteMenuEntriesNode.menuEntries[menuEntry.entryKey]) {
                        const children = await this.lookForMenuEntries([webSiteMenuEntriesTree], menuEntry.entryTypes, webSiteMenuEntriesTree, menuEntry.entryKey, menuEntry.menuEntryLabelKey
                            ? menuEntry.menuEntryLabelKey
                            : 'name', !!menuEntry.adminEntry);
                        webSiteMenuEntriesNode.menuEntriesList[menuEntry.entryKey] = {
                            entityCtx: webSiteMenuEntriesTree.entityCtx,
                            treeNode: {
                                menuTitle: webSiteMenuEntriesNode.menuTitle,
                                name: webSiteMenuEntriesNode.name,
                            },
                            id: webSiteMenuEntriesTree.id +
                                '/menuEntries/' +
                                menuEntry.entryKey,
                            uri: webSiteMenuEntriesTree.uri +
                                '/menuEntries/' +
                                menuEntry.entryKey,
                            aliasUri: undefined,
                            children: children,
                            disabled: 0 === children.length,
                            singleMenu: 0 === children.length ||
                                (1 === children.length && children[0].singleMenu),
                            adminEntry: !!menuEntry.adminEntry,
                        };
                        if (webSiteMenuEntriesNode.menuEntriesList[menuEntry.entryKey]
                            .singleMenu &&
                            !webSiteMenuEntriesNode.menuEntriesList[menuEntry.entryKey]
                                .disabled) {
                            webSiteMenuEntriesNode.menuEntriesList[menuEntry.entryKey].pageTreeId = children[0].pageTreeId;
                            webSiteMenuEntriesNode.menuEntriesList[menuEntry.entryKey].pageTreeUri = children[0].pageTreeUri;
                        }
                    }
                }
            }
        }
        catch (error) { }
    }
    async lookForMenuEntries(trees, entryTypes, webSiteMenuEntriesTree, entryKey, menuEntryLabelKey, adminEntry) {
        const parentMenuTrees = [];
        for (const tree of trees) {
            if (!!tree.treeNode[menuEntryLabelKey] &&
                lodash_1.intersection(await this.objectTypeService.getImplementedTypes(tree.treeNode.objectTypeId), entryTypes).length > 0) {
                const children = await this.lookForMenuEntries(tree.children, entryTypes, webSiteMenuEntriesTree, entryKey, menuEntryLabelKey, adminEntry);
                parentMenuTrees.push({
                    entityCtx: tree.entityCtx,
                    pageTreeId: tree.id,
                    pageTreeUri: tree.uri,
                    id: webSiteMenuEntriesTree.id +
                        '/menuEntries/' +
                        entryKey +
                        '/' +
                        tree.id,
                    uri: webSiteMenuEntriesTree.uri +
                        '/menuEntries/' +
                        entryKey +
                        '/' +
                        tree.id,
                    treeNode: tree.treeNode,
                    children: children,
                    singleMenu: 0 === children.length,
                    adminEntry: adminEntry,
                    menuTitle: tree.treeNode[menuEntryLabelKey],
                });
            }
            else {
                parentMenuTrees.push(...(await this.lookForMenuEntries(tree.children, entryTypes, webSiteMenuEntriesTree, entryKey, menuEntryLabelKey, adminEntry)));
            }
        }
        return parentMenuTrees;
    }
    async completeWebSiteMenuEntriesNode(objectNode, ctx) {
        var _a, _b, _c, _d, _e;
        const menuEntriesProperty = (_c = (_b = (_a = objectNode.entityCtx) === null || _a === void 0 ? void 0 : _a.jsonSchema) === null || _b === void 0 ? void 0 : _b.properties) === null || _c === void 0 ? void 0 : _c.menuEntries;
        const templateMenuEntries = (_e = (_d = objectNode.webSiteTree) === null || _d === void 0 ? void 0 : _d.treeNode) === null || _e === void 0 ? void 0 : _e.menuEntries;
        if (menuEntriesProperty && templateMenuEntries) {
            for (const menuEntry of templateMenuEntries) {
                menuEntriesProperty.properties[menuEntry.entryKey] = {
                    type: 'string',
                    title: menuEntry.entryName,
                    'x-schema-form': {
                        type: 'conditional-text',
                        conditionalValue: {
                            title: 'Display ' + menuEntry.entryName + ' menu',
                            defaultValue: 'return "' + menuEntry.entryName + '"',
                        },
                    },
                };
            }
        }
    }
    async completePageWithTemplateChoiceNode(objectNode, ctx) {
        var _a, _b;
        if ((_b = (_a = objectNode.entityCtx) === null || _a === void 0 ? void 0 : _a.jsonSchema) === null || _b === void 0 ? void 0 : _b.properties.pageTemplateChoice) {
            const treeNode = await this.objectNodeService.getTreeNode(objectNode, ctx);
            if (treeNode.webSiteObjectTreeId) {
                const templateNode = await this.insideRestService.read(this.uriCompleteService.getUri(models_1.EntityName.objectNode, treeNode.webSiteObjectTreeId, ctx), ctx);
                if (templateNode === null || templateNode === void 0 ? void 0 : templateNode.pageTemplateChoices) {
                    const oneOf = [];
                    for (const pageTemplateChoice of templateNode.pageTemplateChoices) {
                        if (lodash_1.intersection(await this.objectTypeService.getImplementedTypes(objectNode.objectTypeId), pageTemplateChoice.pageTypes).length > 0) {
                            oneOf.push({
                                enum: [pageTemplateChoice.pageTypeKey],
                                title: pageTemplateChoice.pageTypeName,
                            });
                        }
                    }
                    if (0 < oneOf.length) {
                        objectNode.entityCtx.jsonSchema.properties.pageTemplateChoice.oneOf = oneOf;
                        if (objectNode.pageTemplateChoice) {
                            const pageTemplateChoice = lodash_1.find(templateNode.pageTemplateChoices, (choice) => objectNode.pageTemplateChoice === choice.pageTypeKey);
                            if (pageTemplateChoice === null || pageTemplateChoice === void 0 ? void 0 : pageTemplateChoice.pageTemplateObjectTreeId) {
                                objectNode.pageTemplateObjectTreeId =
                                    pageTemplateChoice.pageTemplateObjectTreeId;
                                if (pageTemplateChoice === null || pageTemplateChoice === void 0 ? void 0 : pageTemplateChoice.pageTemplateConfigurationObjectTreeId) {
                                    objectNode.pageTemplateConfigurationObjectTreeId =
                                        pageTemplateChoice.pageTemplateConfigurationObjectTreeId;
                                }
                                if (pageTemplateChoice.templatesConfigurations) {
                                    this.addTemplatesConfigurations(objectNode, pageTemplateChoice.templatesConfigurations);
                                }
                            }
                            this.uriCompleteService.addUri(objectNode, ctx);
                            await this.transientUriReferenceService.completeReturnedEntity(objectNode, ctx);
                        }
                    }
                }
            }
        }
    }
    async completeParagraphWithTemplateChoiceNode(objectNode, ctx) {
        var _a, _b;
        if ((_b = (_a = objectNode.entityCtx) === null || _a === void 0 ? void 0 : _a.jsonSchema) === null || _b === void 0 ? void 0 : _b.properties.paragraphTemplateChoice) {
            const treeNode = await this.objectNodeService.getTreeNode(objectNode, ctx);
            if (treeNode.webSiteObjectTreeId) {
                const templateNode = await this.insideRestService.read(this.uriCompleteService.getUri(models_1.EntityName.objectNode, treeNode.webSiteObjectTreeId, ctx), ctx);
                if (templateNode === null || templateNode === void 0 ? void 0 : templateNode.paragraphTemplateChoices) {
                    const oneOf = [];
                    for (const paragraphTemplateChoice of templateNode.paragraphTemplateChoices) {
                        if (-1 <
                            lodash_1.indexOf(paragraphTemplateChoice.paragraphTypes, objectNode.objectTypeId)) {
                            oneOf.push({
                                enum: [paragraphTemplateChoice.paragraphTypeKey],
                                title: paragraphTemplateChoice.paragraphTypeName,
                            });
                        }
                    }
                    if (0 < oneOf.length) {
                        objectNode.entityCtx.jsonSchema.properties.paragraphTemplateChoice.oneOf = oneOf;
                        if (!objectNode.paragraphTemplateChoice) {
                            objectNode.paragraphTemplateChoice = oneOf[0].enum[0];
                        }
                        if (objectNode.paragraphTemplateChoice) {
                            const paragraphTemplateChoice = lodash_1.find(templateNode.paragraphTemplateChoices, (choice) => objectNode.paragraphTemplateChoice ===
                                choice.paragraphTypeKey);
                            if (paragraphTemplateChoice === null || paragraphTemplateChoice === void 0 ? void 0 : paragraphTemplateChoice.paragraphTemplateObjectTreeId) {
                                objectNode.paragraphTemplateObjectTreeId =
                                    paragraphTemplateChoice.paragraphTemplateObjectTreeId;
                                if (paragraphTemplateChoice === null || paragraphTemplateChoice === void 0 ? void 0 : paragraphTemplateChoice.paragraphTemplateConfigurationObjectTreeId) {
                                    objectNode.paragraphTemplateConfigurationObjectTreeId =
                                        paragraphTemplateChoice.paragraphTemplateConfigurationObjectTreeId;
                                }
                                if (paragraphTemplateChoice.templatesConfigurations) {
                                    this.addTemplatesConfigurations(objectNode, paragraphTemplateChoice.templatesConfigurations);
                                }
                            }
                            this.uriCompleteService.addUri(objectNode, ctx);
                            await this.transientUriReferenceService.completeReturnedEntity(objectNode, ctx);
                        }
                    }
                    else {
                        delete objectNode.entityCtx.jsonSchema.properties
                            .paragraphTemplateChoice;
                    }
                }
            }
        }
    }
    /*
    async completeWebSiteWithPagesTemplateNode(
      objectNode: ObjectNode,
      ctx: CurrentContext,
    ) {
      await this.transientContentGenericService.addTemplateConfiguration(
        objectNode.entityCtx?.jsonSchema?.properties?.pageTemplateChoices?.items,
        'pageTemplateObjectTreeId',
        'model.pageTemplateChoices[arrayIndex]',
        ctx,
      );
      this.addTemplatesConfigurationsReferences(objectNode);
    }
    */
    /*
    async completeWebSiteWithParagraphsTemplateNode(
      objectNode: ObjectNode,
      ctx: CurrentContext,
    ) {
      await this.transientContentGenericService.addTemplateConfiguration(
        objectNode.entityCtx?.jsonSchema?.properties?.paragraphTemplateChoices
          ?.items,
        'paragraphTemplateObjectTreeId',
        'model.paragraphTemplateChoices[arrayIndex]',
        ctx,
      );
      this.addTemplatesConfigurationsReferences(objectNode);
    }
  */
    async completePageWithSubPageNode(objectNode, ctx) {
        var _a;
        if (!objectNode.entityCtx) {
            objectNode.entityCtx = { entityType: models_1.EntityName.objectNode };
        }
        if (!((_a = objectNode.entityCtx) === null || _a === void 0 ? void 0 : _a.actions)) {
            objectNode.entityCtx.actions = {};
        }
        if (!objectNode.entityCtx.actions.methods) {
            objectNode.entityCtx.actions.methods = [];
        }
        objectNode.entityCtx.actions.methods.push({
            methodId: 'addParagraph',
            methodName: 'Add text',
            actionName: 'Add text',
            parameters: {
                properties: {
                    title: {
                        type: 'string',
                        title: 'Title',
                        default: '',
                        'x-schema-form': {
                            type: 'conditional-text',
                            conditionalValue: {
                                title: 'Specify a paragraph title',
                                defaultValue: `return ${JSON.stringify(objectNode.title)}`,
                            },
                        },
                    },
                    text: {
                        type: 'string',
                        title: 'Text',
                        default: '',
                        required: true,
                        'x-schema-form': {
                            type: 'textarea',
                        },
                    },
                },
            },
            icon: 'fas fa-bars',
        });
        objectNode.entityCtx.actions.methods.push({
            methodId: 'addEvent',
            methodName: 'Create Event',
            actionName: 'Create Event',
            parameters: {
                properties: {
                    title: {
                        type: 'string',
                        title: 'Title',
                        required: true,
                    },
                },
            },
            icon: 'fas fa-calendar',
        });
        await this.webSiteService.completeEventMethodDefinition(objectNode.entityCtx.actions.methods[objectNode.entityCtx.actions.methods.length - 1]);
        const objectTree = await this.insideRestService.read(this.uriCompleteService.getUri(models_1.EntityName.objectTree, objectNode.id, ctx), ctx);
        const pageNodes = (await this.objectTreeService.getChildrenByImplementedTypeId(objectTree))[web_site_const_1.PAGE_TYPE.name];
        objectNode.pageNodes = pageNodes
            ? pageNodes.map((tree) => tree.treeNode)
            : [];
    }
    async completePageNode(objectNode, ctx) {
        objectNode.pageId = objectNode.id;
        objectNode.siteId = objectNode.parentNamespaceId;
        if (objectNode.name) {
            objectNode.anchor = objectNode.name.replace(/[\.-]/g, '_');
        }
    }
    async completePageTree(objectTree, ctx) {
        if (!objectTree.treeNode.pageTitle) {
            const parentPage = await this.getParentPage(objectTree.treeNode, undefined, ctx);
            if (parentPage) {
                objectTree.parentPage = parentPage;
                objectTree.parentPage.anchor =
                    'anchor_' + objectTree.treeNode.name.replace(/[\.-]/g, '_');
            }
        }
    }
    async getParentPage(page, defaultParent, ctx) {
        if (!(page.parentNodeId in ctx.cacheContext.loadedNodes)) {
            if (page.parentTreeId !== page.parentNodeId) {
                await this.objectNodeService.searchByParentTreeId(page.parentTreeId, {}, ctx);
            }
            else {
                await this.objectNodeService.searchById(page.parentNodeId, undefined, undefined, ctx);
            }
            if (!(page.parentNodeId in ctx.cacheContext.loadedNodes)) {
                return defaultParent;
            }
        }
        const parent = ctx.cacheContext.loadedNodes[page.parentNodeId];
        const parentImplemntedType = await this.objectTypeService.getImplementedTypes(parent.objectTypeId);
        if (!parentImplemntedType.includes(web_site_const_1.PAGE_TYPE.name)) {
            return defaultParent;
        }
        if (parent.pageTitle) {
            return { pageId: parent.id, pageName: parent.name };
        }
        return this.getParentPage(parent, { pageId: parent.id, pageName: parent.name }, ctx);
    }
    async completePageWithParagraphNode(objectNode, ctx) {
        const objectTree = await this.insideRestService.read(this.uriCompleteService.getUri(models_1.EntityName.objectTree, objectNode.id, ctx), ctx);
        const paragraphNodes = (await this.objectTreeService.getChildrenByImplementedTypeId(objectTree))[web_site_const_1.PARAGRAPH_TYPE.name];
        objectNode.paragraphNodes = paragraphNodes
            ? paragraphNodes
                .map((tree) => tree.treeNode)
                .filter((treeNode) => !!treeNode.pageTitle ||
                !treeNode.paragraphDisplay ||
                'display' === treeNode.paragraphDisplay)
            : [];
        if (objectNode.name) {
            objectNode.anchor = objectNode.name.replace(/[\.-]/g, '_');
        }
    }
    async completeParagraphContainerNode(objectNode, ctx) {
        return this.completePageWithParagraphNode(objectNode, ctx);
    }
};
TransientWebSiteService = tslib_1.__decorate([
    tslib_1.__param(0, core_1.service(transient_entity_service_1.TransientEntityService)),
    tslib_1.__param(1, core_1.service(inside_rest_service_1.InsideRestService)),
    tslib_1.__param(2, core_1.service(object_node_service_1.ObjectNodeService)),
    tslib_1.__param(3, core_1.service(services_1.ObjectTypeService)),
    tslib_1.__param(4, core_1.service(uri_complete_service_1.UriCompleteService)),
    tslib_1.__param(5, core_1.service(transient_uri_reference_service_1.TransientUriReferenceService)),
    tslib_1.__param(6, core_1.service(transient_content_generic_service_1.TransientContentGenericService)),
    tslib_1.__param(7, core_1.service(object_tree_service_1.ObjectTreeService)),
    tslib_1.__param(8, core_1.service(web_site_service_1.WebSiteService)),
    tslib_1.__metadata("design:paramtypes", [transient_entity_service_1.TransientEntityService,
        inside_rest_service_1.InsideRestService,
        object_node_service_1.ObjectNodeService,
        services_1.ObjectTypeService,
        uri_complete_service_1.UriCompleteService,
        transient_uri_reference_service_1.TransientUriReferenceService,
        transient_content_generic_service_1.TransientContentGenericService,
        object_tree_service_1.ObjectTreeService,
        web_site_service_1.WebSiteService])
], TransientWebSiteService);
exports.TransientWebSiteService = TransientWebSiteService;
//# sourceMappingURL=transient-web-site.service.js.map