export const stringSchema = {
    type: 'object',
    properties: {
        name: { type: 'string', title: 'Name' },
    },
};
export const numberSchema = {
    type: 'object',
    properties: {
        age: { type: 'number', title: 'Age' },
    },
};
export const booleanSchema = {
    type: 'object',
    properties: {
        active: { type: 'boolean', title: 'Active' },
    },
};
export const enumSchema = {
    type: 'object',
    properties: {
        color: {
            type: 'string',
            title: 'Color',
            enum: ['red', 'green', 'blue'],
        },
    },
};
export const requiredFieldSchema = {
    type: 'object',
    properties: {
        name: { type: 'string', title: 'Name' },
    },
    required: ['name'],
};
export const emailFormatSchema = {
    type: 'object',
    properties: {
        email: { type: 'string', title: 'Email', format: 'email' },
    },
    required: ['email'],
};
export const arraySchema = {
    type: 'object',
    properties: {
        tags: {
            type: 'array',
            title: 'Tags',
            items: { type: 'string' },
        },
    },
};
export const nestedObjectSchema = {
    type: 'object',
    properties: {
        address: {
            type: 'object',
            title: 'Address',
            properties: {
                street: { type: 'string', title: 'Street' },
                city: { type: 'string', title: 'City' },
            },
        },
    },
};
export const arrayOfObjectsSchema = {
    type: 'object',
    properties: {
        heroes: {
            type: 'array',
            title: 'Heroes',
            items: {
                type: 'object',
                title: 'Hero',
                properties: {
                    name: { type: 'string', title: 'Name' },
                },
            },
        },
    },
};
export const dynamicSchema = {
    type: 'object',
    properties: {
        name: { type: 'string', title: 'Name' },
    },
};
export const dynamicSchemaUpdated = {
    type: 'object',
    properties: {
        name: { type: 'string', title: 'Name' },
        email: { type: 'string', title: 'Email' },
    },
};
export const helpSchema = {
    type: 'object',
    properties: {
        name: {
            type: 'string',
            title: 'Name',
            lime: {
                help: {
                    value: 'Enter your full name',
                },
            },
        },
    },
};
export const gridLayoutSchema = {
    type: 'object',
    properties: {
        first: { type: 'string', title: 'First' },
        second: { type: 'string', title: 'Second' },
    },
    lime: {
        layout: {
            type: 'grid',
            columns: 2,
        },
    },
};
export const collapsibleSchema = {
    type: 'object',
    properties: {
        details: {
            type: 'object',
            title: 'Details',
            properties: {
                info: { type: 'string', title: 'Info' },
            },
            lime: {
                collapsible: true,
            },
        },
    },
};
export const dateSchema = {
    type: 'object',
    properties: {
        birthday: { type: 'string', title: 'Birthday', format: 'date' },
    },
};
export const integerSchema = {
    type: 'object',
    properties: {
        count: { type: 'integer', title: 'Count' },
    },
};
export const serverErrorsSchema = {
    type: 'object',
    properties: {
        name: { type: 'string', title: 'Name' },
    },
};
export const transformErrorsSchema = {
    type: 'object',
    properties: {
        code: { type: 'string', title: 'Code', pattern: '^[A-Z]{3}$' },
    },
    required: ['code'],
};
export const customComponentSchema = {
    type: 'object',
    properties: {
        enabled: {
            type: 'boolean',
            title: 'Enabled',
            lime: {
                component: {
                    name: 'limel-switch',
                },
            },
        },
    },
};
export const undefinedComponentSchema = {
    type: 'object',
    properties: {
        field: {
            type: 'string',
            title: 'Field',
            lime: {
                component: {
                    name: 'limel-does-not-exist',
                },
            },
        },
    },
};
export const emptySchema = {
    type: 'object',
    properties: {},
};
export const hiddenFieldSchema = {
    type: 'object',
    properties: {
        visible: { type: 'string', title: 'Visible' },
        secret: {
            type: 'string',
            title: 'Secret',
            lime: { hidden: true },
        },
    },
};
export const readOnlyFieldSchema = {
    type: 'object',
    properties: {
        locked: {
            type: 'string',
            title: 'Locked',
            readOnly: true,
        },
    },
};
export const arrayMaxItemsSchema = {
    type: 'object',
    properties: {
        tags: {
            type: 'array',
            title: 'Tags',
            items: { type: 'string' },
            maxItems: 2,
        },
    },
};
export const arrayItemControlsSchema = {
    type: 'object',
    properties: {
        items: {
            type: 'array',
            title: 'Items',
            items: { type: 'string' },
            lime: {
                allowItemReorder: false,
                allowItemRemoval: false,
            },
        },
    },
};
export const rowLayoutSchema = {
    type: 'object',
    properties: {
        first: {
            type: 'string',
            title: 'First',
            description: 'First field description',
        },
        second: {
            type: 'string',
            title: 'Second',
            description: 'Second field description',
        },
    },
    lime: {
        layout: {
            type: 'row',
        },
    },
};
export const rowLayoutWithCustomComponentSchema = {
    type: 'object',
    properties: {
        name: {
            type: 'string',
            title: 'Name',
            description: 'Name description',
        },
        active: {
            type: 'boolean',
            title: 'Active',
            description: 'Active description',
            lime: {
                component: {
                    name: 'limel-switch',
                },
            },
        },
    },
    lime: {
        layout: {
            type: 'row',
        },
    },
};
export const nestedArrayObjectSchema = {
    type: 'object',
    properties: {
        people: {
            type: 'array',
            title: 'People',
            items: {
                type: 'object',
                title: 'Person',
                properties: {
                    name: { type: 'string', title: 'Name' },
                    address: {
                        type: 'object',
                        title: 'Address',
                        properties: {
                            street: { type: 'string', title: 'Street' },
                            city: { type: 'string', title: 'City' },
                        },
                    },
                },
            },
        },
    },
};
export const topLevelStringCustomComponentSchema = {
    type: 'object',
    properties: {
        icon: {
            type: 'string',
            title: 'Icon',
            lime: { component: { name: 'limel-input-field' } },
        },
    },
};
export const arrayItemWithDependenciesSchema = {
    type: 'object',
    properties: {
        entries: {
            type: 'array',
            title: 'Entries',
            items: {
                type: 'object',
                properties: {
                    useA: {
                        type: 'boolean',
                        title: 'Use A',
                    },
                },
                required: ['useA'],
                dependencies: {
                    useA: {
                        oneOf: [
                            {
                                properties: {
                                    useA: { const: true },
                                    valueA: {
                                        type: 'string',
                                        title: 'Value A',
                                    },
                                },
                            },
                            {
                                properties: {
                                    useA: { const: false },
                                    valueB: {
                                        type: 'string',
                                        title: 'Value B',
                                    },
                                },
                            },
                        ],
                    },
                },
            },
        },
    },
};
export const arrayItemWithDependenciesAndCustomConfigSchema = {
    type: 'object',
    properties: {
        entries: {
            type: 'array',
            title: 'Entries',
            items: {
                type: 'object',
                properties: {
                    useA: {
                        type: 'boolean',
                        title: 'Use A',
                    },
                    config: {
                        type: 'object',
                        title: 'Config',
                        additionalProperties: { type: 'string' },
                        lime: {
                            component: { name: 'limel-input-field' },
                        },
                    },
                },
                required: ['useA'],
                dependencies: {
                    useA: {
                        oneOf: [
                            {
                                properties: {
                                    useA: { const: true },
                                    valueA: {
                                        type: 'string',
                                        title: 'Value A',
                                    },
                                },
                            },
                            {
                                properties: { useA: { const: false } },
                            },
                        ],
                    },
                },
                additionalProperties: true,
            },
        },
    },
};
export const nestedStringCustomComponentSchema = {
    type: 'object',
    properties: {
        views: {
            type: 'array',
            title: 'Views',
            items: {
                type: 'object',
                properties: {
                    icon: {
                        type: 'string',
                        title: 'Icon',
                        lime: { component: { name: 'limel-input-field' } },
                    },
                },
            },
        },
    },
};
