import { z } from "zod"

// Query
export const staysInput = z
  .object({
    cursor: z
      .number()
      .optional()
      .transform((num) => (num ? String(num) : undefined)),
    limit: z
      .number()
      .min(0)
      .default(6)
      .transform((num) => String(num)),
  })
  .default({})

export const friendTransactionsInput = z
  .object({
    limit: z.number().int().positive(),
    page: z.number().int().positive(),
  })
  .default({ limit: 5, page: 1 })

// Mutation
export const addCreditCardInput = z.object({
  language: z.string(),
})

export const deleteCreditCardInput = z.object({
  creditCardId: z.string(),
})

export const saveCreditCardInput = z.object({
  transactionId: z.string(),
  merchantId: z.string().optional(),
})
