"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CalendarProvider = void 0;
const helper_1 = require("../../helper");
const extension_provider_1 = require("../../integration/extension.provider");
const web_site_provider_1 = require("./../web-site/web-site.provider");
const calendar_const_1 = require("./calendar.const");
const calendar_service_1 = require("./calendar.service");
class CalendarProvider extends extension_provider_1.ExtensionProvider {
    constructor(app) {
        super(calendar_const_1.CALENDAR_PROVIDER, app);
        this.app = app;
        this.requiredProviders.push(web_site_provider_1.WebSiteProvider);
        this.services.push({ cls: calendar_service_1.CalendarService });
        this.objectTypes.push(calendar_const_1.CALENDAR_TEMPLATE_TYPE, calendar_const_1.CALENDAR_TYPE, calendar_const_1.CALENDAR_ENTRY_TYPE, calendar_const_1.CALENDAR_PAGE_TYPE, calendar_const_1.CALENDAR_ENTRIES_TYPE);
        this.objectTrees.calendar = {
            reset: false,
            parentNode: () => this.appCtx.publicTemplatesNode.value,
            treeNodeName: 'calendar',
            treeNodeTypeId: calendar_const_1.CALENDAR_TEMPLATE_TYPE.name,
            tree: {
                treeNode: {
                    contentGenericTemplate: helper_1.contentGenericTemplate(__dirname, 'calendar'),
                },
                children: {},
            },
        };
        this.objectSubTypes.push(calendar_const_1.CATEGORY_CALENDAR_TEMPLATE_SUBTYPE, calendar_const_1.CALENDAR_PAGE_CALENDAR_TEMPLATE_SUBTYPE);
    }
}
exports.CalendarProvider = CalendarProvider;
//# sourceMappingURL=calendar.provider.js.map