import { z } from "zod";

export const ClaimSchema = z.object({
  subject: z.string().min(1),
  predicate: z.string().min(1),
  object: z.string().min(1),
  confidence: z.number().min(0).max(1),
  quote: z.string(),
  source: z.string().nullable(),
});

export const RelatedClaimSchema = z.object({
  claim: ClaimSchema,
  relationship: z.string(),
  source: z.string(),
});

export const ClaimCheckSchema = z.object({
  claim: ClaimSchema,
  status: z.enum(["new", "matches", "contradicts"]),
  related: z.array(RelatedClaimSchema),
});

export const SettingsSchema = z.object({
  llmProvider: z.enum(["anthropic", "groq", "local"]),
  apiKey: z.string().nullable(),
  autoSave: z.boolean(),
  notificationsEnabled: z.boolean(),
});
