import {
  SportTypes,
  ProfileTypes,
  PROFILE_NAMES,
} from 'config'

const IMAGES_URLS = {
  [SportTypes.BASKETBALL]: 'https://basketball.instatscout.com/images',
  [SportTypes.FOOTBALL]: 'https://instatscout.com/images',
  [SportTypes.HOCKEY]: 'https://hockey.instatscout.com/images',
  [SportTypes.HANDBALL]: 'https://handball.instatscout.com/images',
}

type GetLogoArgs = {
  id: number,
  profileType: ProfileTypes,
  size?: number,
  sportType: SportTypes,
}

export const getProfileLogo = ({
  id,
  profileType,
  size = 180,
  sportType,
}: GetLogoArgs) => (
  `${IMAGES_URLS[sportType]}/${PROFILE_NAMES[profileType]}/${size}/${id}.png`
)
