using System.ComponentModel;

namespace YMhut.Box.Core.Settings;

public interface ISettingsService : INotifyPropertyChanged
{
    AppSettings Current { get; }

    string SettingsPath { get; }

    Task<AppSettings> LoadAsync(CancellationToken cancellationToken = default);

    Task SaveAsync(CancellationToken cancellationToken = default);

    Task UpdateAsync(Action<AppSettings> update, CancellationToken cancellationToken = default);

    Task RecordRecentToolAsync(string toolId, CancellationToken cancellationToken = default);

    Task SaveWindowBoundsAsync(
        double x,
        double y,
        double width,
        double height,
        bool maximized,
        CancellationToken cancellationToken = default);
}
