'use strict';

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

const BarTimeseriesMeasureSchema = z.z.object({
    id: z.z.string(),
    display: z.z.string().optional(),
    unit: z.z.enum(Validate.UnitType).optional(),
});
const BarTimeseriesOptions = z.z.object({
    showLatest: z.z.literal(false),
});
const BarTimeseriesSchema = z.z.object({
    ...Validate.DashboardVisualisationSchema.shape,
    display: z.z.string(),
    type: z.z.literal('bar-timeseries'),
    options: z.z.object(BarTimeseriesOptions.shape).optional(),
    columns: z.z.object({
        ...Validate.DashboardColumns.shape,
        measures: z.z.array(BarTimeseriesMeasureSchema).min(1, 'Measure must contain at least one item'),
    }),
});
const BarTimeseriesChartSchemas = {
    BarTimeseriesSchema,
};

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