import {
  type RESTAURANT_REWARD_IDS,
  type REWARD_IDS,
} from "@/constants/rewards"

import type { LogoAndIllustrationProps } from "@scandic-hotels/design-system/Icons"

import type {
  ApiReward,
  BenefitReward,
  CMSReward,
  CouponReward,
} from "@/types/trpc/routers/contentstack/reward"

export type { BaseReward, Campaign, Reward, Surprise, Tier }

export interface RewardIconProps extends LogoAndIllustrationProps {
  rewardId: string
  iconSize?: "small" | "medium" | "large"
}

export type RewardId = (typeof REWARD_IDS)[keyof typeof REWARD_IDS]

export type RestaurantRewardId = (typeof RESTAURANT_REWARD_IDS)[number]

type BaseReward = ApiReward & CMSReward
type Campaign = CouponReward &
  CMSReward & {
    rewardType: "Campaign"
  }
type Surprise = CouponReward &
  CMSReward & {
    rewardType: "Surprise"
  }
type Tier = BenefitReward &
  CMSReward & {
    rewardType: "Tier"
  }
type MemberVoucher = CouponReward &
  CMSReward & {
    rewardType: "Member-voucher"
  }
type Reward = Campaign | Surprise | Tier | MemberVoucher
