"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HeaderBlock = exports.HeaderProperties = exports.HeaderBackgroundProps = exports.HeaderVideoIframeProps = void 0;
const schema_1 = require("../../components/Image/schema.js");
const common_1 = require("../../gravity-blocks/schema/validators/common.js");
const utils_1 = require("../../gravity-blocks/schema/validators/utils.js");
exports.HeaderVideoIframeProps = {
    type: 'object',
    additionalProperties: false,
    required: ['src'],
    properties: {
        src: { type: 'string' },
        autoplay: { type: 'boolean' },
        previewImg: { type: 'string' },
        height: { type: 'number' },
    },
};
exports.HeaderBackgroundProps = {
    type: 'object',
    additionalProperties: false,
    required: [],
    properties: {
        ...common_1.MediaProps,
        fullWidth: { type: 'boolean' },
        fullWidthMedia: { type: 'boolean' },
    },
};
exports.HeaderProperties = {
    title: {
        type: 'string',
        contentType: 'text',
    },
    overtitle: {
        type: 'string',
        contentType: 'text',
    },
    description: {
        type: 'string',
        contentType: 'yfm',
        inputType: 'textarea',
    },
    additionalInfo: {
        type: 'string',
        contentType: 'yfm',
        inputType: 'textarea',
    },
    width: {
        type: 'string',
        enum: ['s', 'm', 'l'],
    },
    buttons: (0, utils_1.filteredArray)(common_1.ButtonBlock),
    offset: {
        type: 'string',
        enum: ['default', 'large'],
    },
    image: (0, common_1.withTheme)(schema_1.ImageProps),
    video: (0, common_1.withTheme)(common_1.VideoProps),
    videoIframe: (0, common_1.withTheme)(exports.HeaderVideoIframeProps),
    mediaView: {
        type: 'string',
        enum: common_1.mediaView,
    },
    backLink: {
        type: 'object',
        required: ['url', 'title'],
        properties: {
            url: {
                type: 'string',
            },
            title: {
                type: 'string',
                contentType: 'text',
            },
        },
    },
    imageSize: {
        type: 'string',
        enum: ['s', 'm'],
    },
    verticalOffset: {
        type: 'string',
        enum: ['0', 's', 'm', 'l', 'xl'],
    },
    background: (0, common_1.withTheme)(exports.HeaderBackgroundProps),
    theme: {
        type: 'string',
        enum: ['default', 'dark'],
    },
    breadcrumbs: common_1.HeaderBreadcrumbsProps,
    status: {
        type: 'string',
    },
    centered: {
        type: 'boolean',
    },
};
exports.HeaderBlock = {
    'header-block': {
        additionalProperties: false,
        required: ['title'],
        properties: {
            ...common_1.BlockBaseProps,
            ...exports.HeaderProperties,
        },
    },
};
//# sourceMappingURL=schema.js.map
