'use strict';

var z = require('zod');

function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }

var z__default = /*#__PURE__*/_interopDefault(z);

// src/server/schemas/rule-group.ts
var ruleSchema = z__default.default.object({
  field: z__default.default.string(),
  operator: z__default.default.enum([
    "equals",
    "not_equals",
    "contains",
    "not_contains",
    "greater_than",
    "less_than",
    "greater_than_or_equal",
    "less_than_or_equal",
    "in",
    "not_in",
    "exists",
    "not_exists"
  ]),
  value: z__default.default.unknown().optional()
});
var ruleGroupDepth2 = z__default.default.object({
  operator: z__default.default.enum(["AND", "OR"]),
  conditions: z__default.default.array(ruleSchema)
});
var ruleGroupDepth1 = z__default.default.object({
  operator: z__default.default.enum(["AND", "OR"]),
  conditions: z__default.default.array(z__default.default.union([ruleSchema, ruleGroupDepth2]))
});
var ruleGroupSchema = z__default.default.object({
  operator: z__default.default.enum(["AND", "OR"]),
  conditions: z__default.default.array(z__default.default.union([ruleSchema, ruleGroupDepth1]))
});

exports.ruleGroupSchema = ruleGroupSchema;
exports.ruleSchema = ruleSchema;
//# sourceMappingURL=chunk-RCSPGNEZ.cjs.map
//# sourceMappingURL=chunk-RCSPGNEZ.cjs.map