--[[
    Horizon Suite - Focus - Option color defaults
    Default values for Focus tracker color pickers, exported for use by
    OptionsWidgets (colorMatrixFull) and any code that reads these baselines.
]]
local addon = _G.HorizonSuite
if not addon then return end

-- Use addon.QUEST_COLORS from Config as single source for quest type colors.
local COLOR_KEYS_ORDER = { "DEFAULT", "CAMPAIGN", "IMPORTANT", "LEGENDARY", "WORLD", "DELVES", "SCENARIO", "RAID", "ACHIEVEMENT", "APPEARANCE", "WEEKLY", "PREY", "DAILY", "COMPLETE", "RARE" }
local ZONE_COLOR_DEFAULT     = { 0.55, 0.65, 0.75 }
local OBJ_COLOR_DEFAULT      = { 0.78, 0.78, 0.78 }
local OBJ_DONE_COLOR_DEFAULT = { 0.20, 1.00, 0.40 }  -- matches Ready to Turn In #33FF66
local HIGHLIGHT_COLOR_DEFAULT = { 0.4, 0.7, 1 }

addon.COLOR_KEYS_ORDER        = COLOR_KEYS_ORDER
addon.ZONE_COLOR_DEFAULT      = ZONE_COLOR_DEFAULT
addon.OBJ_COLOR_DEFAULT       = OBJ_COLOR_DEFAULT
addon.OBJ_DONE_COLOR_DEFAULT  = OBJ_DONE_COLOR_DEFAULT
addon.HIGHLIGHT_COLOR_DEFAULT = HIGHLIGHT_COLOR_DEFAULT

-- SetDB routing keys: trigger ApplyMplusTypography / UpdateMplusBlock / click config
addon.FOCUS_CLICK_KEYS = {
    focusClickProfile     = true,
    focusIconClickAction  = true,
    focusClick_left       = true,
    focusClick_shiftLeft  = true,
    focusClick_ctrlLeft   = true,
    focusClick_altLeft    = true,
    focusClick_right      = true,
    focusClick_shiftRight = true,
    focusClick_ctrlRight  = true,
    focusClick_altRight   = true,
}

-- Keys whose values are baked into |cff...|r markup inside UpdateMplusBlockDisplay;
-- changing one requires re-running the display, not just ApplyMplusTypography.
addon.MPLUS_EMBEDDED_MARKUP_KEYS = {
    mplusShowSplitTimer  = true,
    mplusSplitColorR     = true, mplusSplitColorG     = true, mplusSplitColorB     = true,
    mplusSplitPastColorR = true, mplusSplitPastColorG = true, mplusSplitPastColorB = true,
}

addon.MPLUS_TYPOGRAPHY_KEYS = {
    fontPath     = true,
    fontOutline  = true,
    shadowOffsetX = true,
    shadowOffsetY = true,
    showTextShadow = true,
    shadowAlpha  = true,
    mplusDungeonSize   = true,
    mplusDungeonColorR = true, mplusDungeonColorG = true, mplusDungeonColorB = true,
    mplusTimerSize          = true,
    mplusTimerColorR        = true, mplusTimerColorG        = true, mplusTimerColorB        = true,
    mplusTimerOvertimeColorR = true, mplusTimerOvertimeColorG = true, mplusTimerOvertimeColorB = true,
    mplusShowSplitTimer = true,
    mplusSplitSize      = true,
    mplusSplitColorR    = true, mplusSplitColorG    = true, mplusSplitColorB    = true,
    mplusSplitPastColorR = true, mplusSplitPastColorG = true, mplusSplitPastColorB = true,
    mplusProgressSize   = true,
    mplusProgressColorR = true, mplusProgressColorG = true, mplusProgressColorB = true,
    mplusAffixSize      = true,
    mplusAffixColorR    = true, mplusAffixColorG    = true, mplusAffixColorB    = true,
    mplusBossSize       = true,
    mplusBossColorR     = true, mplusBossColorG     = true, mplusBossColorB     = true,
    mplusBarColorR      = true, mplusBarColorG      = true, mplusBarColorB      = true, mplusBarColorA      = true,
    mplusBarDoneColorR  = true, mplusBarDoneColorG  = true, mplusBarDoneColorB  = true, mplusBarDoneColorA  = true,
}

addon.FOCUS_DEFAULTS = {
    -- Layout
    lockPosition              = false,
    growUp                    = false,
    growUpHeaderMode          = "always",
    collapsed                 = false,
    focusDynamicWidth         = false,
    panelWidth                = 260,
    focusDynamicWidthMax      = 400,
    maxContentHeight          = 480,
    staticBackgroundEnabled   = false,
    staticPanelHeight         = 400,
    -- Custom spacing
    customTitleSpacing        = 8,
    customTitleToContentSpacing = 2,
    customSectionSpacing      = 10,
    customSectionToEntryGap   = 6,
    customObjSpacing          = 2,
    customHeaderToContentGap  = 6,
    -- Appearance - Frame
    backdropOpacity           = 0,
    backdropColorR            = 0.08,
    backdropColorG            = 0.08,
    backdropColorB            = 0.12,
    showBorder                = false,
    showScrollIndicator       = false,
    scrollIndicatorStyle      = "fade",
    -- Visibility/Fading
    combatFadeOpacity         = 30,
    showOnMouseoverOnly       = false,
    fadeOnMouseoverOpacity    = 10,
    -- Header
    hideObjectivesHeader      = false,
    showQuestCount            = true,
    headerCountMode           = "trackedLog",
    showHeaderDivider         = true,
    hideOptionsButton         = false,
    -- Sections structure
    showSectionHeaders        = true,
    showSectionDividers       = false,
    showSectionHeadersWhenCollapsed = false,
    showZoneLabels            = true,
    -- Entry details
    showCategoryEntryNumbers  = true,
    objectivePrefixStyle      = "none",
    objectiveProgressNumberColors = true,
    showCompletedCount        = false,
    questCompletedObjectiveDisplay = "off",
    useTickForCompletedObjectives = false,
    showQuestLevel            = false,
    showQuestTypeIcons        = true,
    focusIconSize             = 16,
    showInZoneSuffix          = true,
    autoTrackIcon             = "radar1",
    activeQuestHighlight      = "bar-left",
    showQuestItemButtons      = false,
    focusShowTooltipOnHover   = false,
    focusShowWoWheadLink      = true,
    -- Progress/Timers
    showProgressBarScenarios  = true,
    showProgressBarQuests     = true,
    progressBarUseCategoryColor = true,
    progressBarTypeFilter     = "percent_only",
    progressBarTexture        = "Solid",
    showTimerBars             = true,
    showTimerScenario         = true,
    showTimerWorld            = true,
    showTimerQuestTimed       = true,
    timerDisplayMode          = "inline",
    timerColorByRemaining     = true,
    -- Emphasis
    dimNonSuperTracked        = false,
    dimStrength               = 40,
    dimAlpha                  = 100,
    dimDesaturate             = false,
    highlightAlpha            = 0.25,
    highlightBarWidth         = 2,
    useCompletedObjectiveColor = true,
    -- Click options
    focusClickProfile         = "blizzardDefault",
    focusIconClickAction      = "superTrack",
    requireCtrlForQuestClicks = false,
    requireModifierForClickToComplete = false,
    -- Sorting/Filtering
    filterByZone              = false,
    showFocusedQuestCategory  = true,
    showCurrentQuestCategory  = true,
    currentQuestWindowSec     = 60,
    showNearbyGroup           = true,
    showEventsInZone          = true,
    nearbyCompleteToBottom    = true,
    showCompleteGroup         = true,
    keepCampaignInCategory    = false,
    keepImportantInCategory   = false,
    entrySortMode             = "questType",
    -- Typography
    usePerElementFonts        = false,
    globalFontSizeOffset      = 0,
    headerFontSize            = 16,
    titleFontSize             = 13,
    objectiveFontSize         = 11,
    zoneFontSize              = 10,
    sectionFontSize           = 10,
    progressBarFontSize       = 10,
    timerFontSize             = 13,
    optionsFontSize           = 11,
    fontOutline               = "OUTLINE",
    headerTextCase            = "upper",
    sectionHeaderTextCase     = "proper",
    questTitleCase            = "proper",
    showTextShadow            = true,
    shadowOffsetX             = 2,
    shadowOffsetY             = -2,
    shadowAlpha               = 0.8,
    -- Interactions
    autoTrackOnAccept         = true,
    suppressUntrackedUntilReload = false,
    permanentlySuppressUntracked = false,
    tomtomQuestWaypoint       = false,
    tomtomRareWaypoint        = true,
    -- Animations
    animations                = true,
    objectiveProgressFlash    = true,
    objectiveProgressFlashIntensity = "subtle",
    -- Instances
    showInDungeon             = true,
    showInRaid                = false,
    showInBattleground        = false,
    showInArena               = false,
    showMythicPlusBlock       = true,
    mplusShowSplitTimer       = true,
    mplusAlwaysShow           = false,
    mplusShowAffixIcons       = true,
    mplusShowAffixDescriptions = true,
    mplusBlockPosition        = "top",
    mplusBossCompletedDisplay = "tick",
    mplusDungeonSize          = 14,
    mplusTimerSize            = 13,
    mplusSplitSize            = 12,
    mplusProgressSize         = 12,
    mplusAffixSize            = 12,
    mplusBossSize             = 12,
    mplusDungeonColorR        = 0.96,  mplusDungeonColorG        = 0.96,  mplusDungeonColorB        = 1.0,
    mplusTimerColorR          = 0.6,   mplusTimerColorG          = 0.88,  mplusTimerColorB          = 1.0,
    mplusTimerOvertimeColorR  = 0.9,   mplusTimerOvertimeColorG  = 0.25,  mplusTimerOvertimeColorB  = 0.2,
    mplusSplitColorR          = 0.85,  mplusSplitColorG          = 0.90,  mplusSplitColorB          = 0.55,
    mplusSplitPastColorR      = 0.40,  mplusSplitPastColorG      = 0.40,  mplusSplitPastColorB      = 0.40,
    mplusProgressColorR       = 0.72,  mplusProgressColorG       = 0.76,  mplusProgressColorB       = 0.88,
    mplusBarColorR            = 0.20,  mplusBarColorG            = 0.45,  mplusBarColorB            = 0.60,  mplusBarColorA    = 0.90,
    mplusBarDoneColorR        = 0.15,  mplusBarDoneColorG        = 0.65,  mplusBarDoneColorB        = 0.25,  mplusBarDoneColorA = 0.90,
    mplusAffixColorR          = 0.85,  mplusAffixColorG          = 0.85,  mplusAffixColorB          = 0.95,
    mplusBossColorR           = 0.78,  mplusBossColorG           = 0.82,  mplusBossColorB           = 0.92,
    -- Delves/Scenarios
    showScenarioEvents        = true,
    hideOtherCategoriesInDelve = false,
    showScenarioHeaderCurrenciesInTitle = true,
    cinematicScenarioBar      = true,
    -- Content types
    showWorldQuests           = true,
    showRareBosses            = true,
    showRareLoot              = false,
    rareAddedSound            = true,
    rareAddedSoundChoice      = "default",
    rareAddedSoundVolume      = 100,
    showAchievements          = true,
    showCompletedAchievements = false,
    showAchievementIcons      = true,
    achievementOnlyMissingRequirements = false,
    showAchievementProgressBars = false,
    showEndeavors             = true,
    showCompletedEndeavors    = false,
    showDecor                 = true,
    showDecorIcons            = true,
    showAppearances           = true,
    showCollectedAppearances  = false,
    showAppearanceIcons       = true,
    appearanceIconsUseTransmogTypeIcon = true,
    showRecipes               = true,
    showRecipeReagents        = true,
    recipeReagentsFullDetail  = false,
    showOptionalReagents      = true,
    showFinishingReagents     = true,
    showChoiceSlots           = true,
    showRecipeIcons           = true,
    recipeRarityColors        = true,
    showCraftableCount        = true,
    showRecipeQualityInfo     = false,
    showRecipeRequirements    = false,
    showAHSearchButton        = true,
    showAdventureGuide        = true,
    autoRemoveCompletedAdventureGuide = true,
    showFloatingQuestItem     = false,
    lockFloatingQuestItemPosition = false,
    floatingQuestItemMode     = "superTracked",
}

addon.FOCUS_LIMITS = {
    panelWidth               = { min = 180,  max = 800  },
    focusDynamicWidthMax     = { min = 200,  max = 800  },
    maxContentHeight         = { min = 200,  max = 1500 },
    staticPanelHeight        = { min = 50,   max = 1500 },
    customTitleSpacing       = { min = 2,    max = 20   },
    customTitleToContentSpacing = { min = 0, max = 12   },
    customSectionSpacing     = { min = 0,    max = 24   },
    customSectionToEntryGap  = { min = 0,    max = 16   },
    customObjSpacing         = { min = 0,    max = 8    },
    customHeaderToContentGap = { min = 0,    max = 24   },
    backdropOpacity          = { min = 0,    max = 100  },
    combatFadeOpacity        = { min = 0,    max = 100  },
    fadeOnMouseoverOpacity   = { min = 0,    max = 100  },
    headerHeight             = { min = 18,   max = 48   },
    focusIconSize            = { min = 10,   max = 28   },
    dimStrength              = { min = 0,    max = 100  },
    dimAlpha                 = { min = 0,    max = 100  },
    highlightAlpha           = { min = 0,    max = 100  },
    highlightBarWidth        = { min = 2,    max = 6    },
    currentQuestWindowSec    = { min = 30,   max = 120  },
    globalFontSizeOffset     = { min = -4,   max = 4    },
    headerFontSize           = { min = 8,    max = 32   },
    titleFontSize            = { min = 8,    max = 24   },
    objectiveFontSize        = { min = 8,    max = 20   },
    zoneFontSize             = { min = 8,    max = 18   },
    sectionFontSize          = { min = 8,    max = 18   },
    progressBarFontSize      = { min = 7,    max = 18   },
    timerFontSize            = { min = 8,    max = 24   },
    optionsFontSize          = { min = 8,    max = 20   },
    shadowOffsetX            = { min = -10,  max = 10   },
    shadowOffsetY            = { min = -10,  max = 10   },
    shadowAlpha              = { min = 0,    max = 100  },
    rareAddedSoundVolume     = { min = 50,   max = 200  },
    mplusDungeonSize         = { min = 8,    max = 32   },
    mplusTimerSize           = { min = 8,    max = 32   },
    mplusSplitSize           = { min = 8,    max = 32   },
    mplusProgressSize        = { min = 8,    max = 32   },
    mplusAffixSize           = { min = 8,    max = 32   },
    mplusBossSize            = { min = 8,    max = 32   },
}
