'use strict';

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

const DounutMeasureSchema = z.z.object({
    id: z.z.string(),
    display: z.z.string().optional(),
    unit: z.z.enum(Validate.UnitType).optional(),
});
const DonutOptions = z.z.object({
    showLatest: z.z.boolean().default(true),
});
const DoughnutSchema = z.z.object({
    ...Validate.DashboardVisualisationSchema.shape,
    type: z.z.literal('doughnut'),
    display: z.z.string(),
    options: z.z.object(DonutOptions.shape).optional(),
    columns: z.z.object({
        ...Validate.DashboardColumns.shape,
        measures: z.z.array(DounutMeasureSchema).min(2, 'Measure must contain 2 items'),
    }),
});
const DoughnutChartSchemas = {
    DoughnutSchema,
    DounutMeasureSchema,
};

module.exports = DoughnutChartSchemas;
//# sourceMappingURL=validate.js.map
