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

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

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