using AuthorBuddy.Web.Data;

namespace AuthorBuddy.Web.Services;

public interface ISettingsService
{
    Task<string?> GetOllamaUrlAsync();
    Task<string?> GetRagModelAsync();
    Task<string?> GetStyleModelAsync();
    Task<string?> GetSpellingModelAsync();
    Task<string?> GetThemeAsync();
    Task SaveOllamaUrlAsync(string url);
    Task SaveRagModelAsync(string model);
    Task SaveStyleModelAsync(string model);
    Task SaveSpellingModelAsync(string model);
    Task SaveThemeAsync(string theme);

    Task<string?> GetLektorSystemPromptAsync();
    Task<string?> GetFactCheckTemplateAsync();
    Task<string?> GetSpellingPromptAsync();
    Task<string?> GetAdvocatusDiaboliPromptAsync();
    Task<string?> GetHookFinderPromptAsync();
    Task<string?> GetEli5PromptAsync();

    Task SaveLektorSystemPromptAsync(string prompt);
    Task SaveFactCheckTemplateAsync(string prompt);
    Task SaveSpellingPromptAsync(string prompt);
    Task SaveAdvocatusDiaboliPromptAsync(string prompt);
    Task SaveHookFinderPromptAsync(string prompt);
    Task SaveEli5PromptAsync(string prompt);
    Task<string?> GetLanguageAsync();
    Task SaveLanguageAsync(string language);

    Task<List<UserEntity>> GetUsersAsync();
    Task<UserEntity> GetCurrentUserAsync();
    void SetCurrentUser(int userId);
    Task<UserEntity> CreateUserAsync(string name);

    int? CurrentProjectId { get; set; }
    string? CurrentFilePath { get; set; }
    string? PendingAssistantInput { get; set; }
    string? PendingAssistantOutput { get; set; }
    Task<int?> GetLastProjectIdAsync();
    Task SaveLastProjectIdAsync(int projectId);
    Task LoadProjectSettingsAsync();

    Task InitializeAsync();
}
