local _,ns = ...
ns.ADDUIEVENT("PLAYER_ENTERING_WORLD", function()
if AddUIDB.mmba ==  false then return end
if C_AddOns.IsAddOnLoaded("Dominos") then return end
if C_AddOns.IsAddOnLoaded("Bartender4") then return end


--隐藏动作条按钮相关改动HideActionbarAnimations
local function StyleButton(Button)
	local Name = Button:GetName()
	local InterruptDisplay = _G[Name].InterruptDisplay -- 打断施法红色
	local SpellCastAnimFrame = _G[Name].SpellCastAnimFrame -- 施法进度
	local TargetReticleAnimFrame = _G[Name].TargetReticleAnimFrame -- 地板法术圈
	local CooldownFlash = _G[Name].CooldownFlash -- 冷却完成转圈
	for _, v in pairs ({
		InterruptDisplay,
		SpellCastAnimFrame,
		TargetReticleAnimFrame,
		CooldownFlash,
	}) do 
		hooksecurefunc(v, "Show", function(s)
			s:Hide()
		end)
		v:Show()
	end
end
local bar={"MultiBarBottomLeft", "MultiBarBottomRight", "Action", "MultiBarLeft", "MultiBarRight","MultiBar5","MultiBar6","MultiBar7"} 
for buttons=1,#bar do for i=1,12 do 
	StyleButton(_G[bar[buttons].."Button"..i])
end end
for i = 1, 6 do
	StyleButton(_G["OverrideActionBarButton"..i])
end

--恢复动作条充能冷却闪光HideActionbarAnimations
hooksecurefunc("StartChargeCooldown", function(parent, chargeStart, chargeDuration, chargeModRate)
	if parent.chargeCooldown then
		parent.chargeCooldown:SetEdgeTexture("Interface\\Cooldown\\edge")
	end
end)

if not LibStub or not LibStub("LibCustomGlow-1.0", true) then return end
hooksecurefunc("ActionButton_ShowOverlayGlow", function(button)
	if button.SpellActivationAlert then
		button.SpellActivationAlert:Hide()
	end
	LibStub("LibCustomGlow-1.0").ButtonGlow_Start(button,{0, 1, 1, 1},0.125)
end)
hooksecurefunc("ActionButton_HideOverlayGlow", function(button)
	LibStub("LibCustomGlow-1.0").ButtonGlow_Stop(button)
end)


end)