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

import {
  BestFriend,
  CloseFriend,
  DearFriend,
  GoodFriend,
  LoyalFriend,
  NewFriend,
  TrueFriend,
} from "@/components/Levels"

import type { MembershipLevelIconProps } from "@/types/components/myPages/membership"

export default function MembershipLevelIcon({
  level,
  color = "pale",
  ...props
}: MembershipLevelIconProps) {
  switch (level) {
    case MembershipLevelEnum.L1:
      return <NewFriend color={color} {...props} />
    case MembershipLevelEnum.L2:
      return <GoodFriend color={color} {...props} />
    case MembershipLevelEnum.L3:
      return <CloseFriend color={color} {...props} />
    case MembershipLevelEnum.L4:
      return <DearFriend color={color} {...props} />
    case MembershipLevelEnum.L5:
      return <LoyalFriend color={color} {...props} />
    case MembershipLevelEnum.L6:
      return <TrueFriend color={color} {...props} />
    case MembershipLevelEnum.L7:
      return <BestFriend color={color} {...props} />
    default:
      return null
  }
}
