import { number, string, z } from "zod";

export const settingsSchema = z.object({
  id: z.number(),
  clientId: z.number(),
  propId: z.number(),
  whatsApp: z.number(),
  sms: z.number(),
  rentReminder: z.number(),
  onboardWelcome: z.number(),
  onboardPayment: z.number(),
  isWhatsSelfBranding: z.number(),
  isSMSSelfBranding: z.number(),
  createdAt: z.string(),
  updatedAt: z.string(),
});

type settingsType = z.infer<typeof settingsSchema>;

export const getSettingsSchema = z.object({
  id: settingsSchema.shape.id,
  isEnabled: number(),
});

export const EditSchema = z.object({
  propId: settingsSchema.shape.propId,
  type: string(),
  isEnabled: number(),
});

export default settingsType;