import { z } from 'zod';
import { UnitType, DashboardVisualisationSchema, DashboardColumns } from '../../../_dashboards/dashboard-visualisation/Validate.js';

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

export { DoughnutChartSchemas as default };
//# sourceMappingURL=validate.js.map
