import { z } from "zod";

export const CmsCredentials = z.object({
  advantages: z.object({
    cards: z.array(
      z.object({
        description: z.string(),
        icon: z.string(),
        title: z.string(),
      }),
    ),
    description: z.string(),
    title: z.string(),
  }),
  challenges: z.object({
    cards: z.array(
      z.object({
        description: z.string(),
        icon: z.string(),
        title: z.string(),
      }),
    ),
    description: z.string(),
    title: z.string(),
  }),
  chart: z.object({
    data: z.array(
      z.object({
        key: z.string(),
        value: z.number(),
      }),
    ),
    missedAmount: z.string(),
    title: z.string(),
  }),
  contact: z.object({
    description: z.string(),
    fields: z.array(
      z.object({
        label: z.string(),
        name: z.string(),
        placeholder: z.string(),
        required: z.boolean(),
      }),
    ),
    submitButtonText: z.string(),
    title: z.string(),
  }),
  features: z.object({
    cards: z.array(
      z.object({
        description: z.string(),
        icon: z.string(),
        title: z.string(),
      }),
    ),
    description: z.string(),
    title: z.string(),
  }),
  footer: z.object({
    copyright: z.string(),
    email: z.string(),
    location: z.string(),
    phone: z.string(),
    tagline: z.string(),
  }),
  hero: z.object({
    buttonLink: z.string(),
    buttonText: z.string(),
    description: z.string(),
    gifFile: z.string(),
    title: z.string(),
  }),
});
const CmsSchema = z.object({
  advantages: z.object({
    cards: z.array(
      z.object({
        description: z.string(),
        icon: z.string(),
        title: z.string(),
      }),
    ),
    description: z.string(),
    title: z.string(),
  }),
  challenges: z.object({
    cards: z.array(
      z.object({
        description: z.string(),
        icon: z.string(),
        title: z.string(),
      }),
    ),
    description: z.string(),
    title: z.string(),
  }),
  chart: z.object({
    data: z.array(
      z.object({
        key: z.string(),
        value: z.number(),
      }),
    ),
    missedAmount: z.string(),
    title: z.string(),
  }),
  contact: z.object({
    description: z.string(),
    fields: z.array(
      z.object({
        label: z.string(),
        name: z.string(),
        placeholder: z.string(),
        required: z.boolean(),
      }),
    ),
    submitButtonText: z.string(),
    title: z.string(),
  }),
  features: z.object({
    cards: z.array(
      z.object({
        description: z.string(),
        icon: z.string(),
        title: z.string(),
      }),
    ),
    description: z.string(),
    title: z.string(),
  }),
  footer: z.object({
    copyright: z.string(),
    email: z.string(),
    location: z.string(),
    phone: z.string(),
    tagline: z.string(),
  }),
  hero: z.object({
    buttonLink: z.string(),
    buttonText: z.string(),
    description: z.string(),
    gifFile: z.string(),
    title: z.string(),
  }),
  created_at: z.number(),
  updated_at: z.number(),
  id: z.string(),
  key: z.string(),
  type: z.string(),
});
export const cmsListResponseSchema = z.object({
  cms: z.array(CmsSchema),
});
export const cmsDetailsResponse = z.object({
  cms: CmsSchema,
});
export type TCms = z.infer<typeof CmsSchema>;
export type TCmsListResponse = z.infer<typeof cmsListResponseSchema>;
export type TCmsDetailsResponse = z.infer<typeof cmsDetailsResponse>;
export type TCmsCredentials = z.infer<typeof CmsCredentials>;
