local addonName, addon = ...

-- Frames to permanently hide:
--		false = no need to unregister events
--		true = unregister events (no point processing stuff we'll never see)
local frames = {
	--TargetFrame = false,
	--TargetFrameToT = true,
	ReputationWatchBar = true,
	GameTimeFrame = true,
	CastingBarFrameBorder = false,
	TimeManagerClockButton = false,
	ExhaustionTick = true,
	MainMenuExpBar = true,
	MainMenuBarArtFrame = false,
	MainMenuBarMaxLevelBar = false,
	
	VehicleMenuBarArtFrameOVERLAY1 = false,
	VehicleMenuBarArtFrameOVERLAY2 = false,
	VehicleMenuBarArtFrameOVERLAY3 = false,
	VehicleMenuBarArtFrameOVERLAY4 = false,
	
	--VehicleMenuBarArtFrameARTWORK1 = false,
	--VehicleMenuBarArtFrameARTWORK2 = false,
	--VehicleMenuBarArtFrameARTWORK3 = false,
	--VehicleMenuBarArtFrameARTWORK4 = false,
	--VehicleMenuBarArtFrameARTWORK5 = false,
	--VehicleMenuBarArtFrameARTWORK6 = false,
	--VehicleMenuBarArtFrameARTWORK7 = false,
	--VehicleMenuBarArtFrameARTWORK8 = false,
	--VehicleMenuBarArtFrameARTWORK9 = false,
	--VehicleMenuBarArtFrameARTWORK10 = false,

	--VehicleMenuBarArtFrameBORDER1 = false,
	--VehicleMenuBarArtFrameBORDER2 = false,
	--VehicleMenuBarArtFrameBORDER3 = false,
	--VehicleMenuBarArtFrameBORDER4 = false,
	--VehicleMenuBarArtFrameBORDER5 = false,
	--VehicleMenuBarArtFrameBORDER6 = false,
	--VehicleMenuBarArtFrameBORDER7 = false,
	
	--VehicleMenuBarArtFrameBACKGROUND1 = false,
	--VehicleMenuBarArtFrameBACKGROUND2 = false,
	--VehicleMenuBarArtFrameBACKGROUND3 = false,

	
	MiniMapMailFrame = true,
	MinimapZoomIn = false,
	MinimapZoomOut = false,
	MinimapBackdrop = false,
	MinimapZoneTextButton = false,
	MinimapToggleButton = false,
	MiniMapWorldMapButton = true,

	SmartBuff_MiniMapButton = false,
	CritlineMinimapFrame = false,
	TrinketMenu_IconFrame = false,
	ItemRackMiniMapFrame = false,
	MI3_MinimapButton = false,
	FishingBuddyMinimapFrame = false,
	AltoholicMinimapButton = false,
	--MacaroonMinimapButton = false,
	Gatherer_MinimapOptionsButton = false,
	DBMMinimapButton = false,
	LibDBIcon10_EasyDND = false,
	LibDBIcon10_sRaidFrames = false,
	WIM3MinimapButton = false,
	LibDBIcon10_oRA2 = false,
	LibDBIcon10_AutoBar = false,
	LibDBIcon10_Broker_Auditor = false,
--	LibDBIcon10_BugSack = false,
	DHUDMinimapButton = false,
}

-- Events that no longer need to be monitored:
MainMenuBarArtFrame:UnregisterEvent('ACTIONBAR_PAGE_CHANGED')

--[[-----------------------------------------------------------------------------
Initialize
-------------------------------------------------------------------------------]]
addon.RegisterEvent("HideFrames-Monitor", 'ADDON_LOADED', function(self, event)
	for name, unregister in pairs(frames) do
		local frame = _G[name]
		if frame then
			frames[name] = nil
			addon:HideFrame(frame)
			if unregister then
				frame:UnregisterAllEvents()
				frame:SetScript('OnEvent', nil)
			end
		end
	end
	if next(frames) then return end
	addon.UnregisterEvent(self, event)
end)