export interface State {
  items: Record<string, AudioState>;
}

export interface Audio {
  id: string;
  isPreload: boolean;
  mimeType?: string;
  progress?: number;
  url: string;
}

export interface AudioState {
  duration: number;
  id: string;
  hasEnded: boolean;
  loadingState:
    | "initialisation"
    | "loading"
    | "loaded"
    | {
        error: { code: number };
      };
  isPlaying: boolean;
  isPreload: boolean;
  progress: number;
}
