using API.Data;
using API.Entities.Enums;
using API.Entities.Enums.UserPreferences;
namespace API.Entities;
public class AppUserPreferences
{
    public int Id { get; set; }
    #region MangaReader
    /// 
    /// Manga Reader Option: What direction should the next/prev page buttons go
    /// 
    public ReadingDirection ReadingDirection { get; set; } = ReadingDirection.LeftToRight;
    /// 
    /// Manga Reader Option: How should the image be scaled to screen
    /// 
    public ScalingOption ScalingOption { get; set; } = ScalingOption.Automatic;
    /// 
    /// Manga Reader Option: Which side of a split image should we show first
    /// 
    public PageSplitOption PageSplitOption { get; set; } = PageSplitOption.FitSplit;
    /// 
    /// Manga Reader Option: How the manga reader should perform paging or reading of the file
    /// 
    /// Webtoon uses scrolling to page, MANGA_LR uses paging by clicking left/right side of reader, MANGA_UD uses paging
    /// by clicking top/bottom sides of reader.
    /// 
    /// 
    public ReaderMode ReaderMode { get; set; }
    /// 
    /// Manga Reader Option: Allow the menu to close after 6 seconds without interaction
    /// 
    public bool AutoCloseMenu { get; set; } = true;
    /// 
    /// Manga Reader Option: Show screen hints to the user on some actions, ie) pagination direction change
    /// 
    public bool ShowScreenHints { get; set; } = true;
    /// 
    /// Manga Reader Option: Emulate a book by applying a shadow effect on the pages
    /// 
    public bool EmulateBook { get; set; } = false;
    /// 
    /// Manga Reader Option: How many pages to display in the reader at once
    /// 
    public LayoutMode LayoutMode { get; set; } = LayoutMode.Single;
    /// 
    /// Manga Reader Option: Background color of the reader
    /// 
    public string BackgroundColor { get; set; } = "#000000";
    /// 
    /// Manga Reader Option: Should swiping trigger pagination
    /// 
    public bool SwipeToPaginate { get; set; }
    #endregion
    #region EpubReader
    /// 
    /// Book Reader Option: Override extra Margin
    /// 
    public int BookReaderMargin { get; set; } = 15;
    /// 
    /// Book Reader Option: Override line-height
    /// 
    public int BookReaderLineSpacing { get; set; } = 100;
    /// 
    /// Book Reader Option: Override font size
    /// 
    public int BookReaderFontSize { get; set; } = 100;
    /// 
    /// Book Reader Option: Maps to the default Kavita font-family (inherit) or an override
    /// 
    public string BookReaderFontFamily { get; set; } = "default";
    /// 
    /// Book Reader Option: Allows tapping on side of screens to paginate
    /// 
    public bool BookReaderTapToPaginate { get; set; } = false;
    /// 
    /// Book Reader Option: What direction should the next/prev page buttons go
    /// 
    public ReadingDirection BookReaderReadingDirection { get; set; } = ReadingDirection.LeftToRight;
    /// 
    /// Book Reader Option: Defines the writing styles vertical/horizontal
    /// 
    public WritingStyle BookReaderWritingStyle { get; set; } = WritingStyle.Horizontal;
    /// 
    /// Book Reader Option: The color theme to decorate the book contents
    /// 
    /// Should default to Dark
    public string BookThemeName { get; set; } = "Dark";
    /// 
    /// Book Reader Option: The way a page from a book is rendered. Default is as book dictates, 1 column is fit to height,
    /// 2 column is fit to height, 2 columns
    /// 
    /// Defaults to Default
    public BookPageLayoutMode BookReaderLayoutMode { get; set; } = BookPageLayoutMode.Default;
    /// 
    /// Book Reader Option: A flag that hides the menu-ing system behind a click on the screen. This should be used with tap to paginate, but the app doesn't enforce this.
    /// 
    /// Defaults to false
    public bool BookReaderImmersiveMode { get; set; } = false;
    #endregion
    #region PdfReader
    /// 
    /// PDF Reader: Theme of the Reader
    /// 
    public PdfTheme PdfTheme { get; set; } = PdfTheme.Dark;
    /// 
    /// PDF Reader: Scroll mode of the reader
    /// 
    public PdfScrollMode PdfScrollMode { get; set; } = PdfScrollMode.Vertical;
    /// 
    /// PDF Reader: Spread Mode of the reader
    /// 
    public PdfSpreadMode PdfSpreadMode { get; set; } = PdfSpreadMode.None;
    #endregion
    #region Global
    /// 
    /// UI Site Global Setting: The UI theme the user should use.
    /// 
    /// Should default to Dark
    public required SiteTheme Theme { get; set; } = Seed.DefaultThemes[0];
    /// 
    /// Global Site Option: If the UI should layout items as Cards or List items
    /// 
    /// Defaults to Cards
    public PageLayoutMode GlobalPageLayoutMode { get; set; } = PageLayoutMode.Cards;
    /// 
    /// UI Site Global Setting: If unread summaries should be blurred until expanded or unless user has read it already
    /// 
    /// Defaults to false
    public bool BlurUnreadSummaries { get; set; } = false;
    /// 
    /// UI Site Global Setting: Should Kavita prompt user to confirm downloads that are greater than 100 MB.
    /// 
    public bool PromptForDownloadSize { get; set; } = true;
    /// 
    /// UI Site Global Setting: Should Kavita disable CSS transitions
    /// 
    public bool NoTransitions { get; set; } = false;
    /// 
    /// UI Site Global Setting: When showing series, only parent series or series with no relationships will be returned
    /// 
    public bool CollapseSeriesRelationships { get; set; } = false;
    /// 
    /// UI Site Global Setting: Should series reviews be shared with all users in the server
    /// 
    public bool ShareReviews { get; set; } = false;
    /// 
    /// UI Site Global Setting: The language locale that should be used for the user
    /// 
    public string Locale { get; set; }
    #endregion
    public AppUser AppUser { get; set; } = null!;
    public int AppUserId { get; set; }
}