"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MAP_PAGE_MAP_TEMPLATE_SUBTYPE = exports.CATEGORY_MAP_TEMPLATE_SUBTYPE = exports.MAP_ENTRY_TYPE = exports.WEB_SITE_WITH_MAP_TYPE = exports.MAP_PAGE_TYPE = exports.MAP_TYPE = exports.MAP_ENTRIES_TYPE = exports.MAP_TEMPLATE_TYPE = exports.MAP_PROVIDER = void 0;
const location_const_1 = require("../location/location.const");
const object_tree_const_1 = require("./../../services/object-tree/object-tree.const");
const content_generic_template_const_1 = require("./../content-generic-template/content-generic-template.const");
const web_site_const_1 = require("./../web-site/web-site.const");
exports.MAP_PROVIDER = 'MapProvider';
exports.MAP_TEMPLATE_TYPE = {
    name: 'MapTemplate',
    inheritedTypesIds: [content_generic_template_const_1.TEMPLATE_VIEW_TYPE.name],
};
exports.MAP_ENTRIES_TYPE = {
    name: 'MapEntries',
    inheritedTypesIds: [web_site_const_1.WEB_SITE_MENU_ENTRIES_TYPE.name],
};
exports.MAP_TYPE = {
    name: 'Map',
    title: 'Map',
    inheritedTypesIds: [web_site_const_1.PARAGRAPH_WITH_TEMPLATE_CHOICE_TYPE.name],
    definition: {
        properties: {
            mapEntriesObjectTreeId: {
                title: 'Map to be used',
                type: 'string',
                oneOfTree: [
                    {
                        treeType: exports.MAP_ENTRIES_TYPE.name,
                    },
                ],
            },
            mapEntryKey: {
                title: 'Map name',
                type: 'string',
            },
        },
    },
    iconView: 'far fa-map',
};
exports.MAP_PAGE_TYPE = {
    name: 'MapPage',
    title: 'Map page',
    inheritedTypesIds: [web_site_const_1.PAGE_WITH_PARAGRAPH_TYPE.name],
    iconView: 'fas fa-map-marked-alt',
};
exports.WEB_SITE_WITH_MAP_TYPE = {
    name: 'WebSiteWithMap',
    inheritedTypesIds: [web_site_const_1.WEB_SITE_WITH_MENU_TEMPLATE_TYPE.name],
};
exports.MAP_ENTRY_TYPE = {
    name: 'MapEntry',
    inheritedTypesIds: [web_site_const_1.PAGE_TYPE.name, location_const_1.LOCATION_REFERENCE_TYPE.name],
    definition: {
        properties: {
            locationName: {
                title: 'Location name',
                type: 'string',
                'x-schema-form': {
                    type: 'conditional-text',
                    conditionalValue: {
                        title: 'Localize this event on the map',
                        defaultValue: 'return model.title',
                        dependentValuesReset: { '/locationPosition': '' },
                    },
                    condition: { functionBody: 'return !!model.title' },
                },
            },
            locationPosition: {
                title: 'Location position',
                type: 'string',
                'x-schema-form': {
                    type: 'position',
                    condition: { functionBody: 'return !!model.locationName' },
                },
            },
            locationType: {
                title: 'Location type',
                type: 'string',
                'x-schema-form': {
                    type: 'icon',
                    condition: { functionBody: 'return !!model.locationName' },
                },
                oneOf: [
                    {
                        enum: ['fas fa-male'],
                        title: 'Person',
                    },
                    {
                        enum: ['fas fa-paw'],
                        title: 'Animals',
                    },
                    {
                        enum: ['fas fa-map-signs'],
                        title: 'Direction sign',
                    },
                    {
                        enum: ['fas fa-map-pin'],
                        title: 'Point of interest',
                    },
                    {
                        enum: ['fas fa-crosshairs'],
                        title: 'Position',
                    },
                    {
                        enum: ['fas fa-info-circle'],
                        title: 'Information',
                    },
                    {
                        enum: ['fas fa-street-view'],
                        title: 'Street view',
                    },
                    {
                        enum: ['far fa-eye'],
                        title: 'View point',
                    },
                    {
                        enum: ['fas fa-camera'],
                        title: 'Photo',
                    },
                    {
                        enum: ['fas fa-suitcase'],
                        title: 'Travel',
                    },
                    {
                        enum: ['fas fa-shoe-prints'],
                        title: 'Walk',
                    },
                    {
                        enum: ['fas fa-hiking'],
                        title: 'Hiking',
                    },
                    {
                        enum: ['fas fa-skiing'],
                        title: 'Skiing',
                    },
                    {
                        enum: ['fas fa-snowboarding'],
                        title: 'Snowboarding',
                    },
                    {
                        enum: ['fas fa-skiing-nordic'],
                        title: 'Nordic skiing',
                    },
                    {
                        enum: ['fas fa-swimmer'],
                        title: 'Swimmer',
                    },
                    {
                        enum: ['fas fa-umbrella-beach'],
                        title: 'Plage',
                    },
                    {
                        enum: ['fas fa-life-ring'],
                        title: 'Nautic',
                    },
                    {
                        enum: ['fas fa-route'],
                        title: 'Route',
                    },
                    {
                        enum: ['fas fa-road'],
                        title: 'Road',
                    },
                    {
                        enum: ['fas fa-flag-checkered'],
                        title: 'Frontier',
                    },
                    {
                        enum: ['fas fa-parking'],
                        title: 'Parking',
                    },
                    {
                        enum: ['fas fa-ship'],
                        title: 'Boat',
                    },
                    {
                        enum: ['fas fa-train'],
                        title: 'Train',
                    },
                    {
                        enum: ['fas fa-bus'],
                        title: 'Bus',
                    },
                    {
                        enum: ['fas fa-plane'],
                        title: 'Plane',
                    },
                    {
                        enum: ['fas fa-car-side'],
                        title: 'Car',
                    },
                    {
                        enum: ['fas fa-taxi'],
                        title: 'Taxi',
                    },
                    {
                        enum: ['fas fa-bicycle'],
                        title: 'Bicycle',
                    },
                    {
                        enum: ['fas fa-motorcycle'],
                        title: 'Motorcycle',
                    },
                    {
                        enum: ['fas fa-tram'],
                        title: 'Cable car',
                    },
                    {
                        enum: ['fas fa-helicopter'],
                        title: 'Helicopter',
                    },
                    {
                        enum: ['fas fa-truck'],
                        title: 'Truck',
                    },
                    {
                        enum: ['fas fa-medkit'],
                        title: 'Medical',
                    },
                    {
                        enum: ['fas fa-h-square'],
                        title: 'Hospital',
                    },
                    {
                        enum: ['fas fa-coffee'],
                        title: 'Coffee shop',
                    },
                    {
                        enum: ['fas fa-shopping-basket'],
                        title: 'Shop',
                    },
                    {
                        enum: ['fas fa-cocktail'],
                        title: 'Bar',
                    },
                    {
                        enum: ['fas fa-archway'],
                        title: 'Monument',
                    },
                    {
                        enum: ['fas fa-chess-rook'],
                        title: 'Castle',
                    },
                    {
                        enum: ['fas fa-church'],
                        title: 'Church',
                    },
                    {
                        enum: ['fas fa-cross'],
                        title: 'Cemetery',
                    },
                    {
                        enum: ['fas fa-home'],
                        title: 'Home',
                    },
                    {
                        enum: ['fas fa-campground'],
                        title: 'Campground',
                    },
                    {
                        enum: ['fas fa-bed'],
                        title: 'Hostel',
                    },
                    {
                        enum: ['fas fa-city'],
                        title: 'City',
                    },
                    {
                        enum: ['fas fa-tree'],
                        title: 'Forest',
                    },
                    {
                        enum: ['fas fa-mountain'],
                        title: 'Mountain',
                    },
                    {
                        enum: ['fas fa-swimming-pool'],
                        title: 'Swimming pool',
                    },
                    {
                        enum: ['fas fa-book'],
                        title: 'Library',
                    },
                    {
                        enum: ['far fa-building'],
                        title: 'Building',
                    },
                    {
                        enum: ['fas fa-music'],
                        title: 'Concert',
                    },
                    {
                        enum: ['fas fa-industry'],
                        title: 'Industry',
                    },
                    {
                        enum: ['fas fa-wrench'],
                        title: 'Garage',
                    },
                ],
            },
        },
    },
    contentType: '',
};
exports.CATEGORY_MAP_TEMPLATE_SUBTYPE = {
    typeName: object_tree_const_1.REPOSITORY_CATEGORY_TYPE.name,
    subTypeName: exports.MAP_TEMPLATE_TYPE.name,
    tree: true,
};
exports.MAP_PAGE_MAP_TEMPLATE_SUBTYPE = {
    typeName: exports.MAP_PAGE_TYPE.name,
    subTypeName: exports.MAP_TYPE.name,
};
//# sourceMappingURL=map.const.js.map