local ElvUI_EltreumUI, E, L, V, P, G = unpack(select(2, ...))
local pairs = pairs
local SetCVar = SetCVar
local IsAddOnLoaded = IsAddOnLoaded

--Collapse Quests during boss fights
function ElvUI_EltreumUI:QuestEncounter()
	if E.private.ElvUI_EltreumUI.questsettings.enable then
		local inInstance, instanceType = IsInInstance()
		if instanceType == "raid" or instanceType == "party" or instanceType == "scenario" then  --and event == "PLAYER_REGEN_DISABLED"
			ObjectiveTracker_Collapse()
			if ObjectiveTrackerFrame:IsVisible() or ObjectiveTracker_Expand() then
				ObjectiveTracker_Collapse()
				print('|cff82B4ffEltruism|r: '..'tried to collapse quest!')
			end
		end
	end
end
