'use strict';

var z = require('zod');
var Validate = require('../../../../../components/_dashboards/dashboard-visualisation/Validate.js');

const DashboardSectionSchema = z.z.object({
    id: z.z.string(),
    display: z.z.string(),
    description: z.z.string().optional(),
    visualisations: z.z.array(Validate.default.DashboardVisualisationSchema),
});
const DashboardSchema = z.z.object({
    id: z.z.string(),
    name: z.z.string(),
    description: z.z.string().optional(),
    sections: z.z.array(DashboardSectionSchema, {
        error: (issue) => issue.input === undefined
            ? 'Dashboard definition: Sections is required'
            : 'Dashboard definition: Sections must be an array',
    }),
    filterFields: z.z.array(z.z.any()).optional(), // TODO
});
var DashboardSchema$1 = { DashboardSchema};

module.exports = DashboardSchema$1;
//# sourceMappingURL=validate.js.map
