--[[
============================================================
Decor Vendor Addon
© 2026 MidniteDestiny. All Rights Reserved.
============================================================

This file is part of the Decor Vendor addon.

All code, structure, and design are the intellectual
property of MidniteDestiny unless otherwise stated.

You may NOT:
• Copy, reproduce, or redistribute this code
• Modify and redistribute this code
• Use this code in other addons or projects

without explicit permission from the author.

This addon is distributed for personal use only.

============================================================
]]

local addonName, dv = ...

dv.CONSTANTS = dv.CONSTANTS or {}
local C = dv.CONSTANTS

--------------------------------------------------
-- Colors
--------------------------------------------------
C.COLORS = {}

C.COLORS.ALLIANCE = {0.3, 0.6, 1}
C.COLORS.HORDE = {1, 0.2, 0.2}
C.COLORS.NEUTRAL = {0.2, 0.8, 0.3}
C.COLORS.GOLD = {1, 0.82, 0}	
C.COLORS.GOLD_DIM = { 0.8, 0.66, 0, 1 }
C.COLORS.TITLE = { 0.9, 0.85, 0.5, 1 }
C.COLORS.SIDEBAR_BG = { 0.05, 0.05, 0.08, 0.9 }
C.COLORS.CONTENT_BG = { 0, 0, 0, 0.8 }
C.COLORS.TAB_NORMAL = { 0.1, 0.1, 0.12, 0.8 }
C.COLORS.TAB_HOVER = { 0.15, 0.15, 0.17, 0.9 }
C.COLORS.TAB_SELECTED = { 0.12, 0.12, 0.14, 1 }
C.COLORS.TAB_TEXT_INACTIVE = { 0.56, 0.56, 0.56, 1 }
C.COLORS.TAB_ICON_ALPHA_INACTIVE = 0.75
C.COLORS.TEXT_PRIMARY = { 1, 1, 1, 1 }
C.COLORS.TEXT_SECONDARY = { 0.9, 0.9, 0.9, 1 }
C.COLORS.TEXT_TERTIARY = { 0.7, 0.7, 0.7, 1 }
C.COLORS.TEXT_DISABLED = { 0.5, 0.5, 0.5, 1 }
C.COLORS.BORDER = { 0.3, 0.3, 0.3, 1 }
C.COLORS.PROGRESS_COMPLETE = { 0.2, 1, 0.2, 1 }   
C.COLORS.PROGRESS_NEAR_COMPLETE = { 0.6, 0.9, 0.1, 1 }
C.COLORS.PROGRESS_MID = { 0.75, 0.65, 0.35, 1 }   
C.COLORS.PROGRESS_LOW_DIM = { 0.6, 0.6, 0.6, 1 } 
C.COLORS.PANEL_NORMAL = { 0.14, 0.14, 0.16, 0.9 }
C.COLORS.PANEL_HOVER = { 0.19, 0.19, 0.21, 1 }
C.COLORS.PANEL_NORMAL_ALT = { 0.12, 0.12, 0.14, 0.95 }  
C.COLORS.PANEL_HOVER_ALT = { 0.16, 0.16, 0.18, 1 }
C.COLORS.ROW_BG = { 0.08, 0.08, 0.10, 0.9 }
C.COLORS.ROW_BG_SOLID = { 0.08, 0.08, 0.10, 1 }
C.COLORS.SOURCE_NAME_GOLD = { 0.92, 0.76, 0, 1 }
C.COLORS.ROW_SELECTED = { 0.20, 0.20, 0.22, 1 }
--C.COLORS.HEADER_GRADIENT_TOP = CreateColor(0.15, 0.10, 0.25, 0.85)
--C.COLORS.HEADER_GRADIENT_BOTTOM = CreateColor(0.05, 0.05, 0.15, 0.85)
--------------------------------------------------
-- Spacing
--------------------------------------------------
C.SPACING_SMALL = 4
C.SPACING_NORMAL = 8
C.SPACING_LARGE = 16
--------------------------------------------------
-- Camera
--------------------------------------------------
C.CAMERA = {
TRANSITION_IMMEDIATE = CAMERA_TRANSITION_TYPE_IMMEDIATE or 1,
MODIFICATION_DISCARD = CAMERA_MODIFICATION_TYPE_DISCARD or 1,
MODIFICATION_MAINTAIN = CAMERA_MODIFICATION_TYPE_MAINTAIN or 1,
ORBIT_MOUSE_NOTHING = ORBIT_CAMERA_MOUSE_MODE_NOTHING or 0,
ORBIT_MOUSE_YAW = ORBIT_CAMERA_MOUSE_MODE_YAW_ROTATION or 1,
ORBIT_MOUSE_PITCH = ORBIT_CAMERA_MOUSE_MODE_PITCH_ROTATION or 2,
ORBIT_MOUSE_ZOOM = ORBIT_CAMERA_MOUSE_MODE_ZOOM or 6,
ORBIT_MOUSE_PAN_HORIZONTAL = ORBIT_CAMERA_MOUSE_PAN_HORIZONTAL or 7,
ORBIT_MOUSE_PAN_VERTICAL = ORBIT_CAMERA_MOUSE_PAN_VERTICAL or 8,
PREVIEW_MIN_ZOOM_SCALE = 0.5, 
ROTATION_SPEED = 0.5, 
ZOOM_STEP = 0.02, 
}  

    -- Housing sizes (Enum.HousingCatalogEntrySize values → localization keys)
    -- Use these instead of magic numbers for patch-proof code
C.SCENE_PRESETS = {
        [0]  = Enum.HousingCatalogEntryModelScenePresets.DecorDefault,
        [65] = Enum.HousingCatalogEntryModelScenePresets.DecorTiny,
        [66] = Enum.HousingCatalogEntryModelScenePresets.DecorSmall,
        [67] = Enum.HousingCatalogEntryModelScenePresets.DecorMedium,
        [68] = Enum.HousingCatalogEntryModelScenePresets.DecorLarge,
        [69] = Enum.HousingCatalogEntryModelScenePresets.DecorHuge,
}
C.DEFAULT_SCENE_ID = Enum.HousingCatalogEntryModelScenePresets.DecorDefault
C.MODEL_SCENE_ID = 1317  
--------------------------------------------------
-- Random
--------------------------------------------------
C.MODELCONTAINER_HEIGHT = 300
C.DIVIDER_HEIGHT = 2
C.TITLESEPERATOR_HEIGHT = 2
C.MODEL_ROTATION_SENSITIVITY = 0.01
C.MODEL_ZOOM_SCALE = 1.2
C.MODEL_ZOOM_MIN = 0.5
C.MODEL_ZOOM_MAX = 3.0
C.MODEL_ZOOM_STEP = 0.1
C.MODEL_VERTICAL_OFFSET = -0.1
C.RECIPEFRAME_WIDTH = 300
C.RECIPEFRAME_HEIGHT = 40
C.RECIPEICON_WIDTH = 40
C.RECIPEICON_HEIGHT = 40
C.RECIPETEXT_WIDTH = 200
C.CHECKTOGGLE_WIDTH = 28
C.CHECKTOGGLE_HEIGHT = 28
C.PREVBTN_WIDTH = 32
C.PREVBTN_HEIGHT = 32
C.NEXTBTN_WIDTH = 32
C.NEXTBTN_HEIGHT = 32
C.SIDEBAR_WIDTH = 220
C.PREVIEW_WIDTH = 420
C.SEARCHBOX_WIDTH = 200
C.SEARCHBOX_HEIGHT = 24
C.RESETCACHE_WIDTH = 170
C.RESETCACHE_HEIGHT = 22
C.RESETBTN_WIDTH = 120
C.RESETBTN_HEIGHT = 22
C.INFOSIZE_WIDTH = 24
C.INFOSIZE_HEIGHT = 24
C.CLOSE_WIDTH = 28
C.CLOSE_HEIGHT = 28
C.SCROLLCHILD_WIDTH = 400
C.MODELCONTAINER_HEIGHT = 380
C.DIVIDER_HEIGHT = 2
C.TITLESEPERATOR_HEIGHT = 2
C.DEFAULT_FRAME_WIDTH = 1200
C.DEFAULT_FRAME_HEIGHT = 800
C.MIN_FRAME_WIDTH = 400
C.MIN_FRAME_HEIGHT = 400
C.PREVIEW_DEFAULT_WIDTH = 500
C.HEADER_HEIGHT = 32
C.TITLEBG_HEIGHT = 50
C.VENDOR_HEADER_HEIGHT = 24
C.LINE_HEIGHT = 20
--C.SEARCHBOX_HEIGHT = 24
--C.RESETCACHE_WIDTH = 170
--C.RESETCACHE_HEIGHT = 22
--C.RESETBTN_WIDTH = 120
--C.RESETBTN_HEIGHT = 22
--C.INFOSIZE_WIDTH = 24
--C.INFOSIZE_HEIGHT = 24
--C.CLOSE_WIDTH = 28
--C.CLOSE_HEIGHT = 28
--C.SIDEBAR_WIDTH = 180
--C.PREVIEW_WIDTH = 420
--C.SCROLLCHILD_WIDTH = 520
--C.FRAME_WIDTH = 1200
--C.FRAME_HEIGHT = 800
--C.SIDEBAR_WIDTH = 167