namespace BookReader;

public static class Constants
{
    public static class UI
    {
        public const int ProgressBarMaxWidth = 120;
        public const int CoverImageHeight = 150;
        public const int BookGridSpan = 3;
        public const int HorizontalItemSpacing = 10;
        public const int VerticalItemSpacing = 15;
    }

    public static class Reader
    {
        public const int DefaultFontSize = 18;
        public const int MinFontSize = 12;
        public const int MaxFontSize = 40;
        public const string DefaultTheme = "sepia";
        public const double DefaultBrightness = 100;
        public const double MinBrightness = 70;
        public const double MaxBrightness = 120;
        public const int Base64ChunkSize = 400_000;
        public const int Base64RawChunkSize = 120_000;
        public const int TouchZoneLeftPercent = 30;
        public const int TouchZoneRightPercent = 30;
        public const int TouchZoneCenterPercent = 40;
        public const int SwipeMinDistance = 50;
        public const int SwipeMaxDurationMs = 500;
        public const int ProgressSaveThrottleSeconds = 2;
    }

    public static class Database
    {
        public const string DatabaseFileName = "bookreader.db3";
        public const int RetryCount = 3;
        public const int RetryBaseDelayMs = 100;
        public const int MaxReadingHistoryEntriesPerBook = 200;
    }

    public static class Files
    {
        public const string BooksFolder = "Books";
        public const string DefaultCoverImage = "default_cover.png";
        public const string EpubExtension = ".epub";
        public const string Fb2Extension = ".fb2";
        public const string Fb2ZipExtension = ".fb2.zip";
    }

    public static class Network
    {
        public const int HttpClientTimeoutSeconds = 30;
        public const int DownloadBufferSize = 8192;
        public const int CalibrePageSize = 20;
    }

    public static class StorageKeys
    {
        public const string CalibreUrl = "CalibreUrl";
        public const string CalibreUsername = "CalibreUsername";
        public const string DefaultFontSize = "DefaultFontSize";
        public const string DefaultFontFamily = "DefaultFontFamily";
        public const string Theme = "Theme";
        public const string Brightness = "Brightness";
    }
}
