"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IMAGE_ALBUM_IMAGE_SUBTYPE = exports.IMAGE_GALLERIES_IMAGE_GALLERY_CONCATENATION_SUBTYPE = exports.IMAGE_GALLERIES_IMAGE_ALBUM_SUBTYPE = exports.IMAGE_GALLERY_CONCATENATION_IMAGE_SUBTYPE = exports.IMAGE_TYPE = exports.IMAGE_GALLERY_CONCATENATION_ALL_DEFAULT_TYPE = exports.IMAGE_GALLERY_CONCATENATION_TYPE = exports.IMAGE_GALLERY_SELECTOR_TYPE = exports.IMAGE_GALLERY_REFERRER_TYPE = exports.IMAGE_ALBUM_TYPE = exports.DISPLAYED_IMAGE_GALLERY_TYPE = exports.IMAGE_GALLERY_TYPE = exports.IMAGE_GALLERIES_TYPE = exports.CONTENT_IMAGE_SERVICE = exports.CONTENT_IMAGE_PROVIDER = void 0;
const location_const_1 = require("../location/location.const");
exports.CONTENT_IMAGE_PROVIDER = 'ContentImageProvider';
exports.CONTENT_IMAGE_SERVICE = 'ContentImageService';
exports.IMAGE_GALLERIES_TYPE = {
    name: 'ImageGalleries',
    title: 'Image galleries',
    definition: {
        properties: {},
    },
    contentType: '',
    iconView: 'fas fa-photo-video',
};
exports.IMAGE_GALLERY_TYPE = {
    name: 'ImageGallery',
    inheritedTypesIds: [location_const_1.LOCATABLE_ITEMS_HOLDER_TYPE.name],
    title: 'Image gallery',
    definition: {
        properties: {},
    },
    contentType: '',
    iconView: 'far fa-images',
};
exports.DISPLAYED_IMAGE_GALLERY_TYPE = {
    name: 'DisplayedImageGallery',
    inheritedTypesIds: [exports.IMAGE_GALLERY_TYPE.name],
    definition: {
        properties: {},
    },
    contentType: '',
};
exports.IMAGE_ALBUM_TYPE = {
    name: 'ImageAlbum',
    inheritedTypesIds: [exports.DISPLAYED_IMAGE_GALLERY_TYPE.name],
    title: 'Image album',
    definition: {
        properties: {},
    },
    contentType: '',
    iconView: 'far fa-images',
};
exports.IMAGE_GALLERY_REFERRER_TYPE = {
    name: 'ImageGalleryReferrer',
    title: 'Images referrer',
    inheritedTypesIds: [location_const_1.LOCATABLE_ITEMS_HOLDER_TYPE.name],
    definition: {
        properties: {
            imageGalleryObjectTreeId: {
                title: 'Image album',
                type: 'string',
                oneOfTree: [
                    {
                        treeType: exports.IMAGE_GALLERY_TYPE.name,
                    },
                ],
            },
        },
    },
    contentType: '',
};
exports.IMAGE_GALLERY_SELECTOR_TYPE = {
    name: 'ImageGallerySelector',
    inheritedTypesIds: [exports.IMAGE_GALLERY_REFERRER_TYPE.name],
    definition: {
        properties: {
            selectedImages: {
                title: 'Selected images',
                type: 'array',
                items: {
                    type: 'string',
                },
                'x-schema-form': {
                    condition: 'undefined !== embeddedCondition',
                },
            },
        },
    },
    contentType: '',
};
exports.IMAGE_GALLERY_CONCATENATION_TYPE = {
    name: 'ImageGalleryConcatenation',
    title: 'Concatenation of albums',
    inheritedTypesIds: [exports.DISPLAYED_IMAGE_GALLERY_TYPE.name],
    definition: {
        properties: {
            selectedGalleriesObjectTreeIds: {
                title: 'Selected albums',
                type: 'array',
                items: {
                    type: 'string',
                    enumOfTree: [
                        {
                            treeType: exports.IMAGE_GALLERY_TYPE.name,
                        },
                    ],
                },
            },
        },
    },
    contentType: '',
};
exports.IMAGE_GALLERY_CONCATENATION_ALL_DEFAULT_TYPE = {
    name: 'ImageGalleryConcatenationAllDefault',
    fieldsOrder: ['selectAlbums', 'selectedGalleriesObjectTreeIds'],
    inheritedTypesIds: [exports.IMAGE_GALLERY_CONCATENATION_TYPE.name],
    definition: {
        properties: {
            selectAlbums: {
                type: 'boolean',
                title: 'Select a subset of albums to be displayed',
                default: false,
            },
            selectedGalleriesObjectTreeIds: {
                'x-schema-form': {
                    condition: { functionBody: 'return !!model.selectAlbums' },
                },
            },
        },
    },
};
exports.IMAGE_TYPE = {
    name: 'Image',
    definition: {
        properties: {
            imagePosition: {
                title: 'Image position',
                type: 'string',
                'x-schema-form': {
                    type: 'position',
                    conditionalValue: {
                        title: 'Set the image position',
                    },
                },
            },
            imageDate: {
                title: 'Shooting date',
                type: 'string',
                'x-schema-form': {
                    type: 'date-time',
                    conditionalValue: {
                        title: 'Set a shooting date',
                    },
                },
            },
        },
    },
    contentType: 'ContentImage',
    iconView: 'far fa-image',
    templateView: '<span class="child-tree-preview"><span class="child-image-name">{{dataNode.title}}</span><img style="padding-left: 10px;height: 50px;" src="{{dataNode.contentImageUri}}"/></span>',
};
exports.IMAGE_GALLERY_CONCATENATION_IMAGE_SUBTYPE = {
    typeName: exports.IMAGE_GALLERY_CONCATENATION_TYPE.name,
    subTypeName: exports.IMAGE_TYPE.name,
    max: 0,
};
exports.IMAGE_GALLERIES_IMAGE_ALBUM_SUBTYPE = {
    typeName: exports.IMAGE_GALLERIES_TYPE.name,
    subTypeName: exports.IMAGE_ALBUM_TYPE.name,
    name: exports.IMAGE_ALBUM_TYPE.name,
    acl: false,
    namespace: false,
    owner: false,
    tree: true,
};
exports.IMAGE_GALLERIES_IMAGE_GALLERY_CONCATENATION_SUBTYPE = {
    typeName: exports.IMAGE_GALLERIES_TYPE.name,
    subTypeName: exports.IMAGE_GALLERY_CONCATENATION_TYPE.name,
    name: exports.IMAGE_GALLERY_CONCATENATION_TYPE.name,
    acl: false,
    namespace: false,
    owner: false,
    tree: true,
};
exports.IMAGE_ALBUM_IMAGE_SUBTYPE = {
    typeName: exports.IMAGE_ALBUM_TYPE.name,
    subTypeName: exports.IMAGE_TYPE.name,
    name: exports.IMAGE_TYPE.name,
    acl: false,
    namespace: false,
    owner: false,
    tree: false,
};
//# sourceMappingURL=content-image.const.js.map