local E = unpack(ElvUI)
local _G = _G
local IsAddOnLoaded = _G.C_AddOns and _G.C_AddOns.IsAddOnLoaded
local table = _G.table

-- Gladdy profile setup
function ElvUI_EltreumUI:GetGladdyProfile()
	if IsAddOnLoaded("Gladdy") then
		local GladdyXZ = _G.GladdyXZ
		if GladdyXZ.profiles.Eltreum then
			--local key = {[E.mynameRealm] = "Eltreum"}
			--table.insert(GladdyXZ.profileKeys, key)
			table.insert(GladdyXZ.profileKeys, E.mynameRealm)
			GladdyXZ["profileKeys"][E.mynameRealm] = "Eltreum"
		else
			GladdyXZ["profiles"]["Eltreum"] = {}
			GladdyXZ["profiles"]["Eltreum"] = {
				["healthBarBgColor"] = {
					["a"] = 1,
				},
				["buffsIconSize"] = 23,
				["drCooldownAlpha"] = 0.9,
				["shadowsightTimerX"] = 2.031761169433594,
				["racialCooldownAlpha"] = 0.9,
				["locked"] = true,
				["racialBorderStyle"] = "Interface\\AddOns\\Gladdy\\Images\\Border_Gloss",
				["barWidth"] = 220,
				["trinketSize"] = 47,
				["healthBarBorderStyle"] = "None",
				["auraFont"] = E.db.general.font,
				["ciYOffset"] = -3.99993896484375,
				["petPortraitBorderStyle"] = "Interface\\AddOns\\Gladdy\\Images\\Border_Gloss",
				["ciXOffset"] = 99.9998779296875,
				["trinketXOffset"] = 220,
				["y"] = 537.3210845994763,
				["x"] = 994.2277052363715,
				["totemPulseCooldownWidth"] = 30,
				["petYOffset"] = 21.50006103515625,
				["castBarWidth"] = 265,
				["bottomMargin"] = 50.99993896484375,
				["drFontScale"] = 0.9,
				["classIconSpecIcon"] = true,
				["trinketFontScale"] = 1.3,
				["trinketWidthFactor"] = 1,
				["castBarTexture"] = "Eltreum-Elvui-Norm",
				["petHeight"] = 19,
				["buffsBuffsCooldownGrowDirection"] = "LEFT",
				["buffsEnabled"] = false,
				["drFont"] = E.db.general.font,
				["petHealthBarTexture"] = "Eltreum-Elvui-Norm",
				["npTremorFont"] = E.db.general.font,
				["cooldownXOffset"] = 1,
				["buffsCooldownGrowDirection"] = "LEFT",
				["highlightBorderSize"] = 2,
				["cooldownFont"] = E.db.general.font,
				["buffsBuffsIconSize"] = 19,
				["buffsBuffsXOffset"] = -50,
				["powerPercentage"] = true,
				["healthBarFont"] = E.db.general.font,
				["racialYOffset"] = 0.0001220703125,
				["ciBorderStyle"] = "Interface\\AddOns\\Gladdy\\Images\\Border_Gloss",
				["healthBarTexture"] = "Eltreum-Elvui-Norm",
				["castBarIconStyle"] = "Interface\\AddOns\\Gladdy\\Images\\Border_Gloss",
				["npTotemPlatesAlphaAlways"] = true,
				["cooldownFontScale"] = 0.6,
				["petHealthBarFont"] = E.db.general.font,
				["racialSize"] = 47,
				["castBarBorderSize"] = 4,
				["petEnabled"] = false,
				["powerBarBorderStyle"] = "None",
				["drXOffset"] = -78.9998779296875,
				["trinketCooldownAlpha"] = 0.9,
				["castBarXOffset"] = -25.9998779296875,
				["castBarIconSize"] = 20,
				["buffsBuffsYOffset"] = -56.5,
				["cooldownYOffset"] = 28.4000244140625,
				["auraBorderStyle"] = "Interface\\AddOns\\Gladdy\\Images\\Border_Gloss",
				["classIconSize"] = 48,
				["classIconWidthFactor"] = 1,
				["classIconXOffset"] = -48,
				["leaderBorder"] = false,
				["castBarBorderStyle"] = "None",
				["cooldownMaxIconsPerLine"] = 14,
				["buffsBorderStyle"] = "Interface\\AddOns\\Gladdy\\Images\\Border_Gloss",
				["powerBarHeight"] = 16,
				["trinketBorderStyle"] = "Interface\\AddOns\\Gladdy\\Images\\Border_Gloss",
				["announcements"] = {
					["trinketUsed"] = false,
					["spec"] = false,
				},
				["shadowsightTimerY"] = 14.73023414611816,
				["highlightInset"] = true,
				["petHealthBarBorderStyle"] = "None",
				["cooldownCooldownAlpha"] = 0.9,
				["newLayout"] = true,
				["racialFont"] = E.db.general.font,
				["healthBarHeight"] = 30,
				["totemPulseTextFont"] = E.db.general.font,
				["drYOffset"] = -0.5,
				["buffsYOffset"] = -32.50006103515625,
				["petHealthBarBorderSize"] = 6,
				["powerBarTexture"] = "Eltreum-Elvui-Norm",
				["drIconSize"] = 31,
				["racialWidthFactor"] = 1,
				["healthBarBorderSize"] = 0.5,
				["npTotemPlatesBorderStyle"] = "Interface\\AddOns\\Gladdy\\Images\\Border_squared_blp",
				["buffsFont"] = E.db.general.font,
				["racialXOffset"] = 267,
				["petXOffset"] = -18,
				["buffsFontScale"] = 0.7000000000000001,
				["buffsCooldownAlpha"] = 0.9,
				["totemPulseBarTexture"] = "ElvUI Norm1",
				["castBarYOffset"] = -48,
				["totemPulseCooldownHeight"] = 30,
				["powerBarFont"] = E.db.general.font,
				["buffsXOffset"] = -50,
				["auraCooldownAlpha"] = 0.9,
				["castBarFont"] = E.db.general.font,
				["totemPulseBarHeight"] = 30,
				["npTotemsShowFriendly"] = false,
				["powerBarBorderSize"] = 1,
				["totemPulseBarWidth"] = 30,
				["petWidth"] = 100,
				["cooldownSize"] = 26,
				["trinketFont"] = E.db.general.font,
				["classIconBorderStyle"] = "Interface\\AddOns\\Gladdy\\Images\\Border_Gloss",
				["healthActual"] = true,
				["cooldown"] = false,
				["drGrowDirection"] = "LEFT",
			}
			GladdyXZ["profileKeys"][E.mynameRealm] = "Eltreum"
		end
	end
end
