import { defineContentConfig, defineCollection} from '@nuxt/content'
import { z } from 'zod/v4'

export default defineContentConfig({
  collections: {
    channels: defineCollection({
      type: 'data',
      source: 'tables/channels.csv',
      schema: z.object({
        Number:z.coerce.number(),
        Channel:z.string(),
        Features:z.string(),
        Packages:z.string()
      })
    }),
    customer_service_numbers: defineCollection({
      type: 'data',
      source: 'tables/customer-service-numbers.csv',
      schema: z.object({
        Contact:z.string(),
        Number:z.string(),
        Hours:z.string().optional()
      })
    }),
    phone_international_rates: defineCollection({
      type: 'data',
      source: 'tables/phone/international-rates.csv',
      schema: z.object({
        Country:z.string(),
        Country_Code:z.number(),
        Current_Rate:z.string()
      })
    }),
    phone_star_codes: defineCollection({
      type: 'data',
      source: 'tables/phone/star-codes.csv',
      schema: z.object({
        Feature:z.string(),
        Activate_via_Phone:z.string(),
        Deactivate_via_Phone:z.string()
      })
    }),
    sun_outages: defineCollection({
      type: 'data',
      source: 'tables/Spring_2026_Sun_Outages.csv',
      schema: z.object({
        Row:z.number(),
        'Channel #':z.number(),
        Channel:z.string(),
        Satellite:z.string(),
        "3/3/2026": z.string(),
        "3/4/2026": z.string(),
        "3/5/2026": z.string(),
        "3/6/2026": z.string(),
        "3/7/2026": z.string(),
        "3/8/2026": z.string(),
        "3/9/2026": z.string()
      })
    }),
    howto: defineCollection({
      type: 'page',
      source: 'howto/**/**',
      schema: z.object({
        icon: z.string()
      })
    }),
    changelog: defineCollection({
      type: 'page',
      source: 'changelog/**/**',
      schema: z.object({
        badgeLabel:z.string(),
        badgeVariant:z.string(),
        badgeColor:z.string(),
        tool:z.string(),
        indicator: z.boolean(),
        title: z.string(),
        description: z.string().optional(),
        date: z.date()
      })
    })
  }
})