"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CALENDAR_PAGE_CALENDAR_TEMPLATE_SUBTYPE = exports.CATEGORY_CALENDAR_TEMPLATE_SUBTYPE = exports.CALENDAR_ENTRY_TYPE = exports.WEB_SITE_WITH_CALENDAR_TYPE = exports.CALENDAR_PAGE_TYPE = exports.CALENDAR_TYPE = exports.CALENDAR_ENTRIES_TYPE = exports.CALENDAR_TEMPLATE_TYPE = exports.CALENDAR_PROVIDER = void 0;
const content_generic_template_const_1 = require("../content-generic-template/content-generic-template.const");
const object_tree_const_1 = require("./../../services/object-tree/object-tree.const");
const web_site_const_1 = require("./../web-site/web-site.const");
exports.CALENDAR_PROVIDER = 'CalendarProvider';
exports.CALENDAR_TEMPLATE_TYPE = {
    name: 'CalendarTemplate',
    inheritedTypesIds: [content_generic_template_const_1.TEMPLATE_VIEW_TYPE.name],
};
exports.CALENDAR_ENTRIES_TYPE = {
    name: 'CalendarEntries',
    inheritedTypesIds: [web_site_const_1.WEB_SITE_MENU_ENTRIES_TYPE.name],
};
exports.CALENDAR_TYPE = {
    name: 'Calendar',
    title: 'Calendar',
    inheritedTypesIds: [web_site_const_1.PARAGRAPH_WITH_TEMPLATE_CHOICE_TYPE.name],
    definition: {
        properties: {
            calendarEntriesObjectTreeId: {
                title: 'Calendar to be used',
                type: 'string',
                oneOfTree: [
                    {
                        treeType: exports.CALENDAR_ENTRIES_TYPE.name,
                    },
                ],
            },
            calendarEntryKey: {
                title: 'Calendar name',
                type: 'string',
            },
        },
    },
    iconView: 'fas fa-calendar',
};
exports.CALENDAR_PAGE_TYPE = {
    name: 'CalendarPage',
    title: 'Calendar page',
    inheritedTypesIds: [web_site_const_1.PAGE_WITH_PARAGRAPH_TYPE.name],
    iconView: 'fas fa-calendar-alt',
};
exports.WEB_SITE_WITH_CALENDAR_TYPE = {
    name: 'WebSiteWithCalendar',
    inheritedTypesIds: [web_site_const_1.WEB_SITE_WITH_MENU_TEMPLATE_TYPE.name],
};
exports.CALENDAR_ENTRY_TYPE = {
    name: 'CalendarEntry',
    inheritedTypesIds: [web_site_const_1.PAGE_TYPE.name],
    definition: {
        properties: {
            calendarDateRange: {
                title: 'Date range',
                type: 'string',
                'x-schema-form': {
                    type: 'conditional-date-range',
                    conditionalValue: {
                        title: 'Add this event in the calendar',
                    },
                    condition: { functionBody: 'return !!model.title' },
                },
            },
        },
    },
    contentType: '',
};
exports.CATEGORY_CALENDAR_TEMPLATE_SUBTYPE = {
    typeName: object_tree_const_1.REPOSITORY_CATEGORY_TYPE.name,
    subTypeName: exports.CALENDAR_TEMPLATE_TYPE.name,
    tree: true,
};
exports.CALENDAR_PAGE_CALENDAR_TEMPLATE_SUBTYPE = {
    typeName: exports.CALENDAR_PAGE_TYPE.name,
    subTypeName: exports.CALENDAR_TYPE.name,
};
//# sourceMappingURL=calendar.const.js.map