import { MusicArtist } from 'models/talent/talent-profile-module.model'
import { SocialProfileLinkItem, SocialProfileLinkTypes } from 'redux/User/types'

import { PreReleaseCustomModal } from './PreReleaseCustomModal'
import { PreReleaseSmartModal } from './PreReleaseSmartModal'

export interface MusicProfileLinkItem extends SocialProfileLinkItem {
  isVisible?: boolean
  isTemporary?: boolean
  artistsToFollow?: MusicArtist[]
  url?: string
}

export const defaultMusicLinks: MusicProfileLinkItem[] = [
  {
    isVisible: false,
    isTemporary: false,
    artistsToFollow: [{ name: '', url: '' }],
    id: 1,
    key: SocialProfileLinkTypes.SPOTIFY,
    icon: 'spotify',
    name: 'Spotify',
    edit: true,
    value: '',
    required: false
  },
  {
    isVisible: false,
    isTemporary: false,
    artistsToFollow: [],
    id: 2,
    key: SocialProfileLinkTypes.APPLE_MUSIC,
    icon: 'apple-music',
    name: 'Apple Music',
    edit: true,
    value: '',
    required: false
  }
]

export const defaultMusicLinkMap = defaultMusicLinks.reduce(
  (acc, link) => ({ ...acc, [link.key]: link }),
  {} as Record<SocialProfileLinkTypes, MusicProfileLinkItem>
)

export { PreReleaseCustomModal, PreReleaseSmartModal }
