/**
 * Types pour le composant Player
 */

export interface Track {
  id: string;
  title: string;
  artist?: string;
  album?: string;
  duration: number;
  url: string;
  cover?: string;
  genre?: string;
}

export interface PlayerState {
  currentTrack: Track | null;
  isPlaying: boolean;
  currentTime: number;
  duration: number;
  volume: number;
  muted: boolean;
  queue: Track[];
  currentIndex: number;
  repeat: 'off' | 'track' | 'playlist';
  shuffle: boolean;
}

export interface PlayerControls {
  play: (track?: Track) => void;
  pause: () => void;
  resume: () => void;
  stop: () => void;
  next: () => void;
  previous: () => void;
  seek: (time: number) => void;
  setVolume: (volume: number) => void;
  toggleMute: () => void;
  toggleShuffle: () => void;
  setRepeat: (repeat: 'off' | 'track' | 'playlist') => void;
  addToQueue: (tracks: Track[]) => void;
  clearQueue: () => void;
}

export type PlayerHook = PlayerState & PlayerControls;
