export { Player } from './Player';
export { LazyPlayer } from './lazy';
export type {
  PlayerProps,
  PlayerState,
  PlayerStateKind,
  PlayerControls,
  PlayerHandle,
  WaveformConfig,
  WaveformMode,
  ReactiveCoverMode,
  PlayerVariant,
  PlayerErrorReason,
} from './types';

// Selector hooks for advanced consumers (rare).
export {
  PlayerProvider,
  usePlayerAudio,
  usePlayerControls,
  usePlayerDuration,
  usePlayerLevels,
  usePlayerMeta,
  usePlayerPaused,
  usePlayerState,
} from './context';
export {
  setActivePlayer,
  getActivePlayer,
  getLastActivePlayer,
  subscribeActivePlayer,
  getPreferences,
  setStoredVolume,
  setStoredMuted,
  subscribePreferences,
} from './store';
export type { PlayerPreferences } from './store';
export {
  useActivePlayer,
  useLastActivePlayer,
  useIsActivePlayer,
} from './hooks/useActivePlayer';
export { usePlayerPreferences } from './hooks/usePlayerPreferences';
export { clearPeaksCache, setPeaks } from './audio';

// Slot components — for custom layouts inside <PlayerProvider>.
// Each one is presentational: reads from the player context, renders one
// piece of UI. Compose them in any grid you want.
export { Cover, CoverPlaceholder, ReactivePulse } from './parts/Cover';
export { Title, Artist, TimeDisplay } from './parts/Meta';
export {
  PlayButton,
  SkipButton,
  VolumeControl,
  LoopButton,
  ControlsRow,
  IconButton,
} from './parts/Controls';
export {
  Waveform,
  PeaksWaveform,
  LiveWaveform,
  BarsWaveform,
  ProgressBar,
  WaveformSkeleton,
} from './parts/Waveform';
export { ErrorState } from './parts/ErrorState';
export { DefaultLayout, CompactLayout } from './parts/Layout';
