local _,ns = ...
ns.ADDUIEVENT("PLAYER_LOGIN", function()
if AddUIDB.raidframebuff ==  true  then  

hooksecurefunc('CompactUnitFrame_UtilSetBuff', function(buffFrame, aura)
	if aura.duration < 61 or aura.expirationTime - GetTime()<61 then 
		local fontsize = buffFrame:GetHeight()/1.7
		buffFrame.cooldown:GetRegions():SetFont(STANDARD_TEXT_FONT, fontsize, nil)
		buffFrame.cooldown:SetHideCountdownNumbers(false)
	else
		buffFrame.cooldown:SetHideCountdownNumbers(true)
	end
end)

hooksecurefunc('CompactUnitFrame_UtilSetDebuff', function(debuffFrame, aura)
	local debuffsize = debuffFrame:GetParent():GetHeight()/3
	if aura.dispelName then
		debuffFrame:SetSize(debuffsize*1.3,debuffsize*1.3)
		debuffFrame.cooldown:GetRegions():SetFont(STANDARD_TEXT_FONT, debuffFrame:GetHeight()/1.8, nil)
		if (aura.duration < 61 or aura.expirationTime - GetTime()<61) and aura.expirationTime - GetTime()>0 then 
			debuffFrame.cooldown:SetHideCountdownNumbers(false)
		else
			debuffFrame.cooldown:SetHideCountdownNumbers(true)
		end
	elseif (aura.duration < 61 or aura.expirationTime - GetTime()<61) and aura.expirationTime - GetTime()>0 then 
		debuffFrame:SetSize(debuffsize,debuffsize)
		debuffFrame.cooldown:SetHideCountdownNumbers(false)
		debuffFrame.cooldown:GetRegions():SetFont(STANDARD_TEXT_FONT, debuffFrame:GetHeight()/1.8, nil)
	else
		debuffFrame:SetSize(debuffsize*.7,debuffsize*.7)
		debuffFrame.cooldown:SetHideCountdownNumbers(true)
	end
end)

end
end)