export interface TrendEntry {
  date: string
  rating: number
  plays: number
}

export interface Card {
  luid: string
  registerTime: string
  accessTime: string
  linked: boolean
  ghost: boolean
}

export interface UserMe {
  username: string
  email: string
  displayName: string
  country: string
  lastLogin: number
  regTime: number
  profileLocation: string
  profileBio: string
  emailConfirmed: boolean
  ghostCard: Card
  cards: Card[]
  computedName: string
}

export interface CardSummaryGame {
  name: string
  rating: number
  lastLogin: string
}

export interface CardSummary {
  maimai: CardSummaryGame | null
  maimai2: CardSummaryGame | null
  chusan: CardSummaryGame | null
  chunithm: CardSummaryGame | null
  ongeki: CardSummaryGame | null
  diva: CardSummaryGame | null
}


export interface ConfirmProps {
  title: string
  message: string
  confirm: () => void
  cancel?: () => void
  dangerous?: boolean
}

export interface GenericGamePlaylog {
  musicId: number
  level: number
  playDate: string
  achievement: number
  maxCombo: number
  totalCombo: number
  afterRating: number
  beforeRating: number
}

export interface RankCount {
  name: string
  count: number
}

export interface GenericGameSummary {
  name: string
  iconId: number
  serverRank: number
  accuracy: number
  rating: number
  ratingHighest: number
  ranks: RankCount[]
  maxCombo: number
  fullCombo: number
  allPerfect: number
  totalScore: number
  plays: number
  totalPlayTime: number
  joined: string
  lastSeen: string
  lastVersion: string
  ratingComposition: { [key: string]: any }
  recent: GenericGamePlaylog[]
}

export interface MusicMeta {
  name: string,
  composer: string,
  bpm: number,
  ver: number,
  note: {
    lv: number
    designer: string
    lv_id: number
    notes: number
  }
}

export type AllMusic = { [key: string]: MusicMeta }