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

--Lua functions
local mInsert = table.insert

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, with short numbers."],
					type = 'input',
					width = 'full',
					get = function() return "mHealth:short" end,
				},
				tag11 = {
					order = 11,
					name = L["Health changes between Max Health and Percent in fight, without AFK."],
					type = 'input',
					width = 'full',
					get = function() return "mHealth:NoAFK" end,
				},
				tag12 = {
					order = 12,
					name = L["Health changes between Max Health and Percent in fight, without AFK, with short numbers."],
					type = 'input',
					width = 'full',
					get = function() return "mHealth:short-NoAFK" end,
				},
				tag13 = {
					order = 13,
					name = L["Health changes between Max Health and Current - Percent in fight."],
					type = 'input',
					width = 'full',
					get = function() return "mHealth:current-percent" end,
				},
				tag14 = {
					order = 14,
					name = L["Health changes between Max Health and Current - Percent in fight, with short numbers."],
					type = 'input',
					width = 'full',
					get = function() return "mHealth:short-current-percent" end,
				},
				tag15 = {
					order = 15,
					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,
				},
				tag16 = {
					order = 16,
					name = L["Health changes between Max Health and Current - Percent in fight, without AFK, with short numbers."],
					type = 'input',
					width = 'full',
					get = function() return "mHealth:short-NoAFK-current-percent" end,
				},
				tag17 = {
					order = 17,
					name = L["mHealth wit Statustimer for Dead and AFK."],
					type = 'input',
					width = 'full',
					get = function() return "mHealth:timer" end,
				},
				tag18 = {
					order = 18,
					name = L["mHealth wit Statustimer for Dead and AFK, with short numbers."],
					type = 'input',
					width = 'full',
					get = function() return "mHealth:short-timer" end,
				},
				tag19 = {
					order = 19,
					name = L["mHealth wit Statustimer for Dead, without AFK."],
					type = 'input',
					width = 'full',
					get = function() return "mHealth:NoAFK-timer" end,
				},
				tag20 = {
					order = 20,
					name = L["mHealth wit Statustimer for Dead, without AFK, with short numbers."],
					type = 'input',
					width = 'full',
					get = function() return "mHealth:short-NoAFK-timer" end,
				},
				tag21 = {
					order = 21,
					name = L["Coloured Statustext."],
					type = 'input',
					width = 'full',
					get = function() return "mStatus" end,
				},
				tag22 = {
					order = 22,
					name = L["Coloured Statustext, with timer for Dead and AFK."],
					type = 'input',
					width = 'full',
					get = function() return "mStatustimer" end,
				},
				tag23 = {
					order = 23,
					name = L["Coloured AFK text."],
					type = 'input',
					width = 'full',
					get = function() return "mAFK" end,
				},
				tag24 = {
					order = 24,
					name = L["Tank and Heal Role written."],
					type = 'input',
					width = 'full',
					get = function() return "mRole" end,
				},
				tag25 = {
					order = 25,
					name = L["Level changes to resting in the City."],
					type = 'input',
					width = 'full',
					get = function() return "mLevel" end,
				},
				tag26 = {
					order = 26,
					name = L["Same as mLevel (hides Level if it is equal)."],
					type = 'input',
					width = 'full',
					get = function() return "mLevelSmart" end,
				},
				tag27 = {
					order = 27,
					name = L["Group number with full text (Group 3)."],
					type = 'input',
					width = 'full',
					get = function() return "mGroup" end,
				},
				tag28 = {
					order = 28,
					name = L["Group number with abbreviated text (Grp. 3)."],
					type = 'input',
					width = 'full',
					get = function() return "mGroup:short" end,
				},
				tag29 = {
					order = 29,
					name = L["PvP text with symbol left."],
					type = 'input',
					width = 'full',
					get = function() return "mPvP:left" end,
				},
				tag30 = {
					order = 30,
					name = L["PvP text with symbol right."],
					type = 'input',
					width = 'full',
					get = function() return "mPvP:right" end,
				},
				tag31 = {
					order = 31,
					name = L["Shows the faction icon when PvP is active."],
					type = 'input',
					width = 'full',
					get = function() return "mPvP:icon" end,
				},
				tag31 = {
					order = 32,
					name = L["Shows the Abbrev Target Name."],
					type = 'input',
					width = 'full',
					get = function() return "mTarget" end,
				},
			},
		},
	}
end

mInsert(ns.Config, OptionsTags)