"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.buildUiSchema = void 0;
const getLayoutSetupUiSchemaElement_1 = require("../../core/schemas/internal/getLayoutSetupUiSchemaElement");
/**
 * @private
 * constructs the complete edit uiSchema for Hub Pages.
 * This defines how the schema properties should be
 * rendered in the page editing experience
 */
const buildUiSchema = (i18nScope, _options, _context
// eslint-disable-next-line @typescript-eslint/require-await
) => {
    return Promise.resolve({
        type: "Layout",
        elements: [
            {
                labelKey: `${i18nScope}.fields.name.label`,
                scope: "/properties/name",
                type: "Control",
                options: {
                    messages: [
                        {
                            type: "ERROR",
                            keyword: "required",
                            icon: true,
                            labelKey: `${i18nScope}.fields.name.requiredError`,
                        },
                        {
                            type: "ERROR",
                            keyword: "maxLength",
                            icon: true,
                            labelKey: `${i18nScope}.fields.name.maxLengthError`,
                        },
                        {
                            type: "ERROR",
                            keyword: "format",
                            icon: true,
                            labelKey: `${i18nScope}.fields.name.entityTitleValidatorError`,
                        },
                    ],
                },
            },
            ...(0, getLayoutSetupUiSchemaElement_1.getLayoutSetupUiSchemaElement)(i18nScope),
        ],
    });
};
exports.buildUiSchema = buildUiSchema;
//# sourceMappingURL=PageUiSchemaCreate.js.map