/**
 * @ai-summary Validation schemas for notifications API
 * @ai-context Zod schemas for request validation
 */

import { z } from 'zod';

// Template key parameter validation
export const TemplateKeyParamSchema = z.object({
  key: z.enum([
    'maintenance_due_soon',
    'maintenance_overdue',
    'document_expiring',
    'document_expired'
  ])
});
export type TemplateKeyParam = z.infer<typeof TemplateKeyParamSchema>;

// Update email template request
export const UpdateEmailTemplateSchema = z.object({
  subject: z.string().min(1).max(255).optional(),
  body: z.string().min(1).optional(),
  isActive: z.boolean().optional(),
});
export type UpdateEmailTemplateRequest = z.infer<typeof UpdateEmailTemplateSchema>;

// Preview template request
export const PreviewTemplateSchema = z.object({
  subject: z.string().min(1).max(255),
  body: z.string().min(1),
  variables: z.record(z.string()),
});
export type PreviewTemplateRequest = z.infer<typeof PreviewTemplateSchema>;
