using Harmonia.Core.Engine;
using Harmonia.Core.Playlists;
using System.ComponentModel;

namespace Harmonia.Core.Player;

public interface IAudioPlayer
{
    Playlist? Playlist { get; }
    PlaylistSong? PlayingSong { get; }
    double Position { get; set; }
    RepeatState RepeatState { get; set; }
    double Volume { get; set; }
    bool IsRandom { get; set; }
    bool IsMuted { get; set; }
    AudioPlaybackState State { get; }

    Task<bool> LoadAsync(int index, PlaybackMode mode);
    Task<bool> LoadAsync(PlaylistSong song, PlaybackMode mode);

    void Play();
    void Pause();
    void Stop();
    Task PreviousAsync();
    Task NextAsync();

    event EventHandler PlaylistChanged;
    event EventHandler PlayingSongChanged;
    event PropertyChangedEventHandler PropertyChanged;
}