local E, L, V, P, G = unpack(ElvUI);
local mPlugin = "mMediaTag"
local mMT = E:GetModule(mPlugin);
local addon, ns = ...

local function OptionsTags()
	E.Options.args.mMediaTag.args.tags.args = {
        tagcolor = {
            order = 10,
            type = "group",
            name = L["Colors"],
            args = {
                headertagcolor1 = {
                order = 1,
                type = "header",
                name = L["Class"],
                },
                colorrare = {
                    type = 'color',
                    order = 2,
                    name = "Rare",
                    desc = L["Class Colors"],
                    hasAlpha = false,
                    get = function(info)
                        local t = E.db[mPlugin].cClassRare
                        return t.r, t.g, t.b
                    end,
                    set = function(info, r, g, b)
                        local t = E.db[mPlugin].cClassRare
                        t.r, t.g, t.b, t.color = r, g, b, E:RGBToHex(r, g, b)
                    end,
                },
                colorrarelite = {
                    type = 'color',
                    order = 3,
                    name = "Rare Elite",
                    desc = L["Class Colors"],
                    hasAlpha = false,
                    get = function(info)
                        local t = E.db[mPlugin].cClassRareElite
                        return t.r, t.g, t.b
                    end,
                    set = function(info, r, g, b)
                        local t = E.db[mPlugin].cClassRareElite
                        t.r, t.g, t.b, t.color = r, g, b, E:RGBToHex(r, g, b)
                    end,
                },
                colorelite = {
                    type = 'color',
                    order = 4,
                    name = "Elite",
                    desc = L["Class Colors"],
                    hasAlpha = false,
                    get = function(info)
                        local t = E.db[mPlugin].cClassElite
                        return t.r, t.g, t.b
                    end,
                    set = function(info, r, g, b)
                        local t = E.db[mPlugin].cClassElite
                        t.r, t.g, t.b, t.color = r, g, b, E:RGBToHex(r, g, b)
                        
                    end,
                },
                colorboss = {
                    type = 'color',
                    order = 4,
                    name = "Boss",
                    desc = L["Class Colors"],
                    hasAlpha = false,
                    get = function(info)
                        local t = E.db[mPlugin].cClassBoss
                        return t.r, t.g, t.b
                    end,
                    set = function(info, r, g, b)
                        local t = E.db[mPlugin].cClassBoss
                        t.r, t.g, t.b, t.color = r, g, b, E:RGBToHex(r, g, b)
                    end,
                },
                headertagcolor2 = {
                order = 5,
                type = "header",
                name = L["General"],
                },
                colorafk = {
                    type = 'color',
                    order = 6,
                    name = "AFK",
                    desc = L["AFK Color"],
                    hasAlpha = false,
                    get = function(info)
                        local t = E.db[mPlugin].cGeneralAFK
                        return t.r, t.g, t.b
                    end,
                    set = function(info, r, g, b)
                        local t = E.db[mPlugin].cGeneralAFK
                        t.r, t.g, t.b, t.color = r, g, b, E:RGBToHex(r, g, b)
                    end,
                },
                colortank = {
                    type = 'color',
                    order = 7,
                    name = "Tank",
                    desc = L["Tank Color"],
                    hasAlpha = false,
                    get = function(info)
                        local t = E.db[mPlugin].cGeneralTank
                        return t.r, t.g, t.b
                    end,
                    set = function(info, r, g, b)
                        local t = E.db[mPlugin].cGeneralTank
                        t.r, t.g, t.b, t.color = r, g, b, E:RGBToHex(r, g, b)
                    end,
                },
                colorheal = {
                    type = 'color',
                    order = 8,
                    name = "Heal",
                    desc = L["Heal Color"],
                    hasAlpha = false,
                    get = function(info)
                        local t = E.db[mPlugin].cGeneralHeal
                        return t.r, t.g, t.b
                    end,
                    set = function(info, r, g, b)
                        local t = E.db[mPlugin].cGeneralHeal
                        t.r, t.g, t.b, t.color = r, g, b, E:RGBToHex(r, g, b)
                    end,
                },
                colorzzz = {
                    type = 'color',
                    order = 9,
                    name = "Zzz",
                    desc = L["Resting Zzz Color"],
                    hasAlpha = false,
                    get = function(info)
                        local t = E.db[mPlugin].cGeneralZzz
                        return t.r, t.g, t.b
                    end,
                    set = function(info, r, g, b)
                        local t = E.db[mPlugin].cGeneralZzz
                        t.r, t.g, t.b, t.color = r, g, b, E:RGBToHex(r, g, b)
                    end,
                },
                colorlevel = {
                    type = 'color',
                    order = 10,
                    name = "Level ??",
                    desc = L["Boss Level ?? Color"],
                    hasAlpha = false,
                    get = function(info)
                        local t = E.db[mPlugin].cGeneralLevel
                        return t.r, t.g, t.b
                    end,
                    set = function(info, r, g, b)
                        local t = E.db[mPlugin].cGeneralLevel
                        t.r, t.g, t.b, t.color = r, g, b, E:RGBToHex(r, g, b)
                    end,
                },
            },
        },
        tagstrings = {
            order = 20,
            type = "group",
            name = L["Tags"],
            args = {
                tag1 = {
                        order = 1,
                        name = L["Classes are fully written."],
                        type = 'input',
                        width = 'full',
                        get = function() return "mClass" end,
                },
                tag2 = {
                        order = 2,
                        name = L["Classes are fully written with spac on left side."],
                        type = 'input',
                        width = 'full',
                        get = function() return "mClass:space-left" end,
                },
                tag3 = {
                        order = 3,
                        name = L["Classes are fully written with spac on right side."],
                        type = 'input',
                        width = 'full',
                        get = function() return "mClass:space-right" end,
                },
                tag4 = {
                        order = 4,
                        name = L["Classes are short written."],
                        type = 'input',
                        width = 'full',
                        get = function() return "mClass:short" end,
                },
                tag5 = {
                        order = 5,
                        name = L["Classes are short written with spac on left side."],
                        type = 'input',
                        width = 'full',
                        get = function() return "mClass:short-space-left" end,
                },
                tag6 = {
                        order = 6,
                        name = L["Classes are short written with spac on right side."],
                        type = 'input',
                        width = 'full',
                        get = function() return "mClass:short-space-right" end,
                },
                tag7 = {
                        order = 7,
                        name = L["Colors Text by Class."],
                        type = 'input',
                        width = 'full',
                        get = function() return "mColor" end,
                },
                tag8 = {
                        order = 8,
                        name = L["Colors Text by Target Class."],
                        type = 'input',
                        width = 'full',
                        get = function() return "mColor:target" end,
                },
                tag9 = {
                        order = 9,
                        name = L["Health changes between Max Health and Percent in fight."],
                        type = 'input',
                        width = 'full',
                        get = function() return "mHealth" end,
                },
                tag10 = {
                        order = 10,
                        name = L["Health changes between Max Health and Percent in fight, without AFK."],
                        type = 'input',
                        width = 'full',
                        get = function() return "mHealth:NoAFK" end,
                },
                tag11 = {
                        order = 11,
                        name = L["Health changes between Max Health and Current - Percent in fight."],
                        type = 'input',
                        width = 'full',
                        get = function() return "mHealth:current-percent" end,
                },
                tag12 = {
                        order = 12,
                        name = L["Health changes between Max Health and Current - Percent in fight, without AFK."],
                        type = 'input',
                        width = 'full',
                        get = function() return "mHealth:NoAFK-current-percent" end,
                },
                tag13 = {
                        order = 13,
                        name = L["mHealth wit Statustimer for Dead and AFK."],
                        type = 'input',
                        width = 'full',
                        get = function() return "mHealth:timer" end,
                },
                tag14 = {
                        order = 14,
                        name = L["mHealth wit Statustimer for Dead, without AFK."],
                        type = 'input',
                        width = 'full',
                        get = function() return "mHealth:NoAFK-timer" end,
                },
                tag15 = {
                        order = 15,
                        name = L["Coloured Statustext."],
                        type = 'input',
                        width = 'full',
                        get = function() return "mStatus" end,
                },
                tag16 = {
                        order = 16,
                        name = L["Coloured Statustext, with timer for Dead and AFK."],
                        type = 'input',
                        width = 'full',
                        get = function() return "mStatus:timer" end,
                },
                tag17 = {
                        order = 17,
                        name = L["Coloured AFK text."],
                        type = 'input',
                        width = 'full',
                        get = function() return "mAFK" end,
                },
                tag18 = {
                        order = 18,
                        name = L["Tank and Heal Role written."],
                        type = 'input',
                        width = 'full',
                        get = function() return "mRole" end,
                },
                tag19 = {
                        order = 19,
                        name = L["Level changes to resting in the City."],
                        type = 'input',
                        width = 'full',
                        get = function() return "mLevel" end,
                },
                tag20 = {
                        order = 20,
                        name = L["Same as mLevel (hides Level if it is equal)."],
                        type = 'input',
                        width = 'full',
                        get = function() return "mLevelSmart" end,
                },
                tag21 = {
                        order = 21,
                        name = L["Group number with full text (Group 3)."],
                        type = 'input',
                        width = 'full',
                        get = function() return "mGroup" end,
                },
                tag22 = {
                        order = 22,
                        name = L["Group number with abbreviated text (Grp. 3)."],
                        type = 'input',
                        width = 'full',
                        get = function() return "mGroup:short" end,
                },
                tag23 = {
                        order = 23,
                        name = L["PvP text with symbol left."],
                        type = 'input',
                        width = 'full',
                        get = function() return "mPvP:left" end,
                },
                tag24 = {
                        order = 24,
                        name = L["PvP text with symbol right."],
                        type = 'input',
                        width = 'full',
                        get = function() return "mPvP:right" end,
                },
                tag25 = {
                        order = 25,
                        name = L["Shows the faction icon when PvP is active."],
                        type = 'input',
                        width = 'full',
                        get = function() return "mPvP:icon" end,
                },
            },
        },
    }
end

table.insert(ns.Config, OptionsTags)