// types.ts export type BoxType = 'playlist' | 'compilation' | 'userPlaylist' export interface BoxSide { duration: number color1: string color2: string name?: string description?: string } export interface Box { id: string type: BoxType name: string description: string state: BoxState duration: number tracks?: Track[] sides?: { A: BoxSide B: BoxSide } activeSide: 'A' | 'B' } export interface Artist { id: number name: string url: string coverId: string } export interface Track { id: number side?: 'A' | 'B' order?: number boxId: string title: string artist?: Artist | number | string start?: number duration?: number url: string coverId?: string date?: Date card?: { suit: CardSuit; rank: CardRank } link?: string type: BoxType year?: number } export interface Playlist { id: number date: Date title: string url: string filename: string } export type BoxState = 'box-hidden' | 'box-list' | 'box-selected' export type CardSuit = '♠' | '♣' | '♦' | '♥' export type CardRank = 'A' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | 'J' | 'Q' | 'K'