local MER, F, E, I, V, P, G, L = unpack(ElvUI_MerathilisUI)
local options = MER.options.modules.args
local LFGPI = MER.Utilities.LFGPlayerInfo

options.tooltip = {
	type = "group",
	name = L["Tooltip"],
	get = function(info)
		return E.db.mui.tooltip[info[#info]]
	end,
	set = function(info, value)
		E.db.mui.tooltip[info[#info]] = value
		E:StaticPopup_Show("PRIVATE_RL")
	end,
	args = {
		header = {
			order = 0,
			type = "header",
			name = F.cOption(L["Tooltip"], "orange"),
		},
		modifier = {
			order = 1,
			type = "select",
			name = L["Modifier Key"],
			desc = format(L["The modifer key to show additional information from %s."], MER.Title),
			set = function(info, value)
				E.db.mui.tooltip[info[#info]] = value
			end,
			values = {
				NONE = L["None"],
				SHIFT = L["Shift"],
				CTRL = L["Ctrl"],
				ALT = L["Alt"],
				ALT_SHIFT = format("%s + %s", L["Alt"], L["Shift"]),
				CTRL_SHIFT = format("%s + %s", L["Ctrl"], L["Shift"]),
				CTRL_ALT = format("%s + %s", L["Ctrl"], L["Alt"]),
				CTRL_ALT_SHIFT = format("%s + %s + %s", L["Ctrl"], L["Alt"], L["Shift"]),
			},
		},
		spacer = {
			order = 2,
			type = "description",
			name = " ",
		},
		icon = {
			order = 3,
			type = "toggle",
			name = L["Tooltip Icons"],
			desc = L["Adds an icon for spells and items on your tooltip."],
		},
		factionIcon = {
			order = 4,
			type = "toggle",
			name = L.FACTION,
			desc = L["Adds an Icon for the faction on the tooltip."],
		},
		petIcon = {
			order = 5,
			type = "toggle",
			name = L["Pet Icon"],
			desc = L["Add an icon for indicating the type of the pet."],
		},
		specIcon = {
			order = 6,
			type = "toggle",
			name = L["Spec Icon"],
			desc = L["Show the icon of the specialization."],
		},
		raceIcon = {
			order = 7,
			type = "toggle",
			name = L["Race Icon"],
			desc = L["Show the icon of the player race."],
		},
		petId = {
			order = 8,
			type = "toggle",
			name = L["Pet ID"],
			desc = L["Show battle pet species ID in tooltips."],
		},
		gradientName = {
			order = 9,
			type = "toggle",
			name = L["Gradient Name"],
		},
		nameHover = {
			order = 15,
			type = "group",
			guiInline = true,
			name = "",
			desc = L["Shows the Unit Name on the mouse."],
			get = function(info)
				return E.db.mui.nameHover[info[#info]]
			end,
			set = function(info, value)
				E.db.mui.nameHover[info[#info]] = value
				E:StaticPopup_Show("PRIVATE_RL")
			end,
			args = {
				header = {
					order = 0,
					type = "header",
					name = F.cOption(L["Name Hover"], "orange"),
				},
				enable = {
					order = 1,
					type = "toggle",
					name = L["Enable"],
				},
				fontSize = {
					order = 2,
					type = "range",
					name = L["Size"],
					min = 4,
					max = 24,
					step = 1,
				},
				fontOutline = {
					order = 3,
					type = "select",
					name = L["Font Outline"],
					values = MER.Values.FontFlags,
					sortByValue = true,
				},
				targettarget = {
					order = 4,
					type = "toggle",
					name = L["Display TargetTarget"],
				},
				gradient = {
					order = 5,
					type = "toggle",
					name = L["Gradient Color"],
					desc = L["Colors the player names in a gradient instead of class color"],
				},
			},
		},
		healthBar = {
			order = 16,
			type = "group",
			inline = true,
			name = "",
			get = function(info)
				return E.db.mui.tooltip.healthBar[info[#info]]
			end,
			set = function(info, value)
				E.db.mui.tooltip[info[#info]] = value
				E:StaticPopup_Show("PRIVATE_RL")
			end,
			args = {
				header = {
					order = 0,
					type = "header",
					name = F.cOption(L["Health Bar"], "orange"),
				},
				barYOffset = {
					order = 1,
					type = "range",
					name = L["Health Bar Y-Offset"],
					desc = L["Change the postion of the health bar."],
					min = -50,
					max = 50,
					step = 1,
				},
				textYOffset = {
					order = 2,
					type = "range",
					name = L["Health Text Y-Offset"],
					desc = L["Change the postion of the health text."],
					min = -50,
					max = 50,
					step = 1,
				},
			},
		},
	},
}
