-- ============================================================================
-- Metadata and Static Data
-- ============================================================================

AIOS_CopyBox_Meta = {
    -- Class colors (RGB values for player classes)
    classColors = {
        WARRIOR = { r = 0.78, g = 0.61, b = 0.43 },
        PALADIN = { r = 0.96, g = 0.55, b = 0.73 },
        HUNTER = { r = 0.67, g = 0.83, b = 0.45 },
        ROGUE = { r = 1.0, g = 0.96, b = 0.41 },
        PRIEST = { r = 1.0, g = 1.0, b = 1.0 },
        DEATHKNIGHT = { r = 0.77, g = 0.12, b = 0.23 },
        SHAMAN = { r = 0.0, g = 0.44, b = 0.87 },
        MAGE = { r = 0.41, g = 0.8, b = 0.94 },
        WARLOCK = { r = 0.58, g = 0.51, b = 0.79 },
        MONK = { r = 0.0, g = 1.00, b = 0.59 },
        DRUID = { r = 1.0, g = 0.49, b = 0.04 },
        DEMONHUNTER = { r = 0.64, g = 0.19, b = 0.79 },
        EVOKER = { r = 0.2, g = 0.8, b = 0.6 }
    },
    
    -- Basic themes (for all versions)
    basicThemes = {
        {
            name = "Black Pearl",
			type = "basic",
			background = { 
				type = "color",
				color = { r = 0.02, g = 0.02, b = 0.02, a = 0.75 }
			},
			border = { r = 0.15, g = 0.15, b = 0.15, a = 0.8 },
			gloss = { r = 0.8, g = 0.85, b = 0.9, a = 0.15 }
		},
        {
            name = "Dark Steel", 
            type = "basic",
            background = { 
                type = "color",
                color = { r = 0.2, g = 0.2, b = 0.25, a = 0.9 }
            },
            border = { r = 0.5, g = 0.5, b = 0.6, a = 0.8 },
            gloss = { r = 0.7, g = 0.7, b = 0.8, a = 0.2 }
        },
        {
			name = "Glossy Glass",
            type = "basic",
            background = { 
                type = "color",
                color = { r = 0.1, g = 0.1, b = 0.2, a = 0.8 }
            },
            border = { r = 0.4, g = 0.6, b = 0.8, a = 0.8 },
            gloss = { r = 0.8, g = 0.9, b = 1.0, a = 0.3 }
		}
    },
    
    -- Advanced themes used on modern Retail clients.
    advancedThemes = {
        {
            name = "Main UI",
            type = "advanced",
            background = { 
                type = "texture",
                texture = "Interface\\AddOns\\AIOS_CopyBox\\Assets\\Mainui.blp"
            },
            border = { r = 0, g = 0, b = 0, a = 0 },
            gloss = { r = 0, g = 0, b = 0, a = 0 },
            scaleX = 1.4,  -- 30% wider
            scaleY = 1.6,  -- 10% taller
            position = "CENTER"
        },
        {
            name = "Blue Theme",
            type = "advanced", 
            background = { 
                type = "texture",
                texture = "Interface\\AddOns\\AIOS_CopyBox\\Assets\\bluebg.blp"
            },
            border = { r = 0, g = 0, b = 0, a = 0 },
            gloss = { r = 0, g = 0, b = 0, a = 0 },
            scaleX = 1.2,  -- Normal width
            scaleY = 1.2,  -- 20% taller
            position = "CENTER"
        },
        {
            name = "Dark Grey",
            type = "advanced",
            background = { 
                type = "texture",
                texture = "Interface\\AddOns\\AIOS_CopyBox\\Assets\\darkgreybg.blp"
            },
            border = { r = 0, g = 0, b = 0, a = 0 },
            gloss = { r = 0, g = 0, b = 0, a = 0 },
            scaleX = 1.2,  -- 40% wider
            scaleY = 1.2,  -- 40% taller (equal scaling)
            position = "CENTER"
        },
        {
            name = "Smoky",
            type = "advanced",
            background = { 
                type = "texture", 
                texture = "Interface\\AddOns\\AIOS_CopyBox\\Assets\\smokybg.blp"
            },
            border = { r = 0, g = 0, b = 0, a = 0 },
            gloss = { r = 0, g = 0, b = 0, a = 0 },
            scaleX = 1.2,  -- 25% wider
            scaleY = 1.2,  -- 15% taller
            position = "CENTER"
        }
    },
    
    -- Tooltip texts
    tooltips = {
        channelSelector = {
            title = "Channel Selector",
            leftClick = "Left-click: Next channel",
            rightClick = "Right-click: Previous channel"
        },
        themeSelector = {
            title = "Theme Selector", 
            leftClick = "Left-click: Next theme",
            rightClick = "Right-click: Previous theme"
        },
        copyBox = {
            title = "CopyBox",
            description = "Click to open/close CopyBox"
        }
    },
    
    -- Default messages
    messages = {
        noMessages = "-- No recent messages in %s --",
        noValidChatFrame = "No valid chat frame found",
        channelNotFound = "Invalid channel ID: %s"
    }
}

-- Get available themes based on version
function AIOS_CopyBox_Meta:GetAvailableThemes()
    if AIOS_CopyBox_Config and AIOS_CopyBox_Config:HasAdvancedThemes() then
        -- Add the advanced theme set on modern Retail clients.
        local combinedThemes = {}
        for _, theme in ipairs(self.basicThemes) do
            table.insert(combinedThemes, theme)
        end
        for _, theme in ipairs(self.advancedThemes) do
            table.insert(combinedThemes, theme)
        end
        return combinedThemes
    else
        -- Only basic themes for older versions
        return self.basicThemes
    end
end

-- Get default theme index based on version
function AIOS_CopyBox_Meta:GetDefaultThemeIndex()
    if AIOS_CopyBox_Config and AIOS_CopyBox_Config:HasAdvancedThemes() then
        return 1 -- Main UI is the default modern Retail theme.
    else
        return 1 -- Glossy Glass for Classic/older
    end
end
