'use strict';

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

const matrixKeys = z.z.object({
    id: z.z.string(),
    optional: z.z.boolean().default(false),
});
const MatrixTimeseriesSchema = z.z.object({
    ...Validate.DashboardVisualisationSchema.shape,
    type: z.z.literal('matrix-timeseries'),
    options: z.z.object(Validate.BucketOptionsSchema.shape).optional(),
    columns: z.z.object({
        ...Validate.DashboardColumns.shape,
        keys: z.z.array(matrixKeys).min(1, 'Key array cannot be empty').optional(),
        measures: z.z.array(Validate.DashboardVisualisationMeasureSchema).length(2, 'Measure must contain a single item'),
    }),
});

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