import z from 'zod';

// src/server/schemas/rule-group.ts
var ruleSchema = z.object({
  field: z.string(),
  operator: z.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.unknown().optional()
});
var ruleGroupDepth2 = z.object({
  operator: z.enum(["AND", "OR"]),
  conditions: z.array(ruleSchema)
});
var ruleGroupDepth1 = z.object({
  operator: z.enum(["AND", "OR"]),
  conditions: z.array(z.union([ruleSchema, ruleGroupDepth2]))
});
var ruleGroupSchema = z.object({
  operator: z.enum(["AND", "OR"]),
  conditions: z.array(z.union([ruleSchema, ruleGroupDepth1]))
});

export { ruleGroupSchema, ruleSchema };
//# sourceMappingURL=chunk-JTAGYRQP.js.map
//# sourceMappingURL=chunk-JTAGYRQP.js.map