using System;
using System.ComponentModel;
using Wino.Core.Domain.Enums;
using Wino.Core.Domain.Models.Calendar;
using Wino.Core.Domain.Models.Reader;
namespace Wino.Core.Domain.Interfaces;
public interface IPreferencesService : INotifyPropertyChanged
{
///
/// When any of the preferences are changed.
///
event EventHandler PreferenceChanged;
#region Common
///
/// Setting: Whether logs are enabled or not.
///
bool IsLoggingEnabled { get; set; }
///
/// Setting: Display language for the application.
///
AppLanguage CurrentLanguage { get; set; }
///
/// Setting: Whether the navigation pane is opened on the last session or not.
///
bool IsNavigationPaneOpened { get; set; }
///
/// Setting: Preferred time format for mail or calendar header display.
///
bool Prefer24HourTimeFormat { get; set; }
///
/// Diagnostic ID for the application.
/// Changes per-install.
///
string DiagnosticId { get; set; }
///
/// Setting: Defines the user's preference of default search mode in mail list.
/// Local search will still offer online search at the end of local search results.
///
SearchMode DefaultSearchMode { get; set; }
///
/// Setting: Interval in minutes for background email synchronization.
///
int EmailSyncIntervalMinutes { get; set; }
///
/// Setting: Default application mode to open when activation does not specify one.
///
WinoApplicationMode DefaultApplicationMode { get; set; }
///
/// Setting: Whether Microsoft Store update notifications should be shown.
///
bool IsStoreUpdateNotificationsEnabled { get; set; }
///
/// Setting: Whether the Wino account profile button in the shell title bar should be hidden.
///
bool IsWinoAccountButtonHidden { get; set; }
///
/// Setting: Default target language code used for AI translation actions.
///
string AiDefaultTranslationLanguageCode { get; set; }
///
/// Setting: Preferred target language code for AI summarize actions.
///
string AiSummarizeLanguageCode { get; set; }
///
/// Setting: Preferred folder path used when saving AI summaries.
///
string AiSummarySavePath { get; set; }
///
/// Serializes the current syncable preferences snapshot.
///
string ExportPreferences();
///
/// Deserializes and applies a preferences snapshot.
/// Returns the applied and failed property counts.
///
(int appliedCount, int failedCount) ImportPreferences(string settingsJson);
#endregion
#region Mail
///
/// Setting: For changing the mail display container mode.
///
MailListDisplayMode MailItemDisplayMode { get; set; }
///
/// Setting: Marking the item as read preference mode.
///
MailMarkAsOption MarkAsPreference { get; set; }
///
/// Setting: How many seconds should be waited on rendering page to mark item as read.
///
int MarkAsDelay { get; set; }
///
/// Setting: Ask confirmation from the user during permanent delete.
///
bool IsHardDeleteProtectionEnabled { get; set; }
///
/// Setting: Thread mails into conversations.
///
bool IsThreadingEnabled { get; set; }
///
/// Setting: Show sender pictures in mail list.
///
bool IsShowSenderPicturesEnabled { get; set; }
///
/// Setting: Show preview text in mail list.
///
bool IsShowPreviewEnabled { get; set; }
///
/// Setting: Set whether 'img' tags in rendered HTMLs should be removed.
///
bool RenderImages { get; set; }
///
/// Setting: Set whether 'style' tags in rendered HTMls should be removed.
///
bool RenderStyles { get; set; }
///
/// Setting: Set whether plaintext links should be automatically converted to clickable links.
///
bool RenderPlaintextLinks { get; set; }
///
/// Gets the preferred rendering options for HTML rendering.
///
MailRenderingOptions GetRenderingOptions();
///
/// Setting: Swipe mail operation when mails are swiped to right.
///
MailOperation RightSwipeOperation { get; set; }
///
/// Setting: Swipe mail operation when mails are swiped to left.
///
MailOperation LeftSwipeOperation { get; set; }
///
/// Setting: Whether hover actions on mail pointer hover is enabled or not.
///
bool IsHoverActionsEnabled { get; set; }
///
/// Setting: Hover action on the left when the mail is hovered over.
///
MailOperation LeftHoverAction { get; set; }
///
/// Setting: Hover action on the center when the mail is hovered over.
///
MailOperation CenterHoverAction { get; set; }
///
/// Setting: Hover action on the right when the mail is hovered over.
///
MailOperation RightHoverAction { get; set; }
///
/// Setting: Which entity id (merged account or folder) should be expanded automatically on startup.
///
Guid? StartupEntityId { get; set; }
///
/// Setting: Display font for the mail reader.
///
string ReaderFont { get; set; }
///
/// Setting: Font size for the mail reader.
///
int ReaderFontSize { get; set; }
///
/// Setting: Display font for the mail composer.
///
string ComposerFont { get; set; }
///
/// Setting: Font size for the mail composer.
///
int ComposerFontSize { get; set; }
///
/// Setting: Whether the next item should be automatically selected once the current item is moved or removed.
///
bool AutoSelectNextItem { get; set; }
///
/// Setting: Whether the mail list action bar is enabled or not.
///
bool IsMailListActionBarEnabled { get; set; }
///
/// Setting: Whether the mail rendering page will show the action labels
///
bool IsShowActionLabelsEnabled { get; set; }
///
/// Setting: Enable/disable Gravatar for sender avatars.
///
bool IsGravatarEnabled { get; set; }
///
/// Setting: Enable/disable Favicon for sender avatars.
///
bool IsFaviconEnabled { get; set; }
#endregion
#region Calendar
DayOfWeek FirstDayOfWeek { get; set; }
bool IsWorkingHoursEnabled { get; set; }
TimeSpan WorkingHourStart { get; set; }
TimeSpan WorkingHourEnd { get; set; }
DayOfWeek WorkingDayStart { get; set; }
DayOfWeek WorkingDayEnd { get; set; }
double HourHeight { get; set; }
string CalendarTimedDayHeaderDateFormat { get; set; }
///
/// Setting: Default reminder duration in seconds for new calendar events.
/// Set to 0 to disable default reminders.
///
long DefaultReminderDurationInSeconds { get; set; }
///
/// Setting: Default snooze duration in minutes for calendar reminder notifications.
///
int DefaultSnoozeDurationInMinutes { get; set; }
///
/// Setting: How the New Event button chooses a calendar.
///
NewEventButtonBehavior NewEventButtonBehavior { get; set; }
///
/// Setting: Default calendar used when New Event is configured to always use a specific calendar.
///
Guid? DefaultNewEventCalendarId { get; set; }
CalendarSettings GetCurrentCalendarSettings();
#endregion
}