import { z } from "zod"

import { MembershipLevelEnum } from "@/constants/membershipLevels"

export const rewardsByLevelInput = z.object({
  level_id: z.nativeEnum(MembershipLevelEnum),
  unique: z.boolean().default(false),
})

export const rewardsAllInput = z
  .object({ unique: z.boolean() })
  .default({ unique: false })

export const rewardsUpdateInput = z.array(
  z.object({
    rewardId: z.string(),
    couponCode: z.string(),
  })
)

export const rewardsRedeemInput = z.object({
  rewardId: z.string(),
  couponCode: z.string().optional(),
})
