local E, L, V, P, G = unpack(ElvUI);
local mPlugin = "mMediaTag"
local mMT = E:NewModule(mPlugin, "AceHook-3.0", "AceEvent-3.0", "AceTimer-3.0");
local EP = LibStub("LibElvUIPlugin-1.0")
local addon, ns = ...
local Version = GetAddOnMetadata(addon, "Version")

--Variables
ns.mName 			= "|CFF8E44ADm|r|CFF2ECC71Media|r|CFF3498DBTag|r"
ns.mNameClassic 	= "|CFF8E44ADm|r|CFF2ECC71Media|r|CFF3498DBTag|r |cffff0066Classic|r"
ns.mVersion 		= Version
ns.mDateTankDD		= "30.05.2021 - "
ns.mDateHeal		= "30.05.2021 - "
ns.mDateNameplate	= "30.05.2021 - "
ns.mDateGlobal		= "30.05.2021 - "
ns.mDateAuren		= "30.05.2021 - "
ns.mDateWeakaura	= "30.05.2021 - "
ns.mColor1 			= "|CFFFFFFFF"	-- white
ns.mColor2 			= "|CFFF7DC6F" 	-- yellow
ns.mColor3 			= "|CFF8E44AD"	-- purple
ns.mColor4 			= "|CFFFE7B2C" 	-- orange
ns.mColor5 			= "|CFFE74C3C" 	-- red
ns.mColor6 			= "|CFF58D68D" 	-- green
ns.mColor7 			= "|CFF3498DB" 	-- blue
ns.mColor8 			= "|CFFB2BABB" 	-- gray
ns.normal			= "|CFF82E0AA"	-- nomral
ns.Heroic			= "|CFF85C1E9 "	-- HC
ns.Mythic 			= "|CFFBB8FCE"	-- Mythic
ns.LeftButtonIcon 	= format("|T%s:16:16:0:0:32:32|t", "Interface\\AddOns\\ElvUI_mMediaTag\\media\\misc\\mouse_l.tga")
ns.RightButtonIcon 	= format("|T%s:16:16:0:0:32:32|t", "Interface\\AddOns\\ElvUI_mMediaTag\\media\\misc\\mouse_r.tga")
ns.MiddleButtonIcon = format("|T%s:16:16:0:0:32:32|t", "Interface\\AddOns\\ElvUI_mMediaTag\\media\\misc\\mouse_m.tga")
ns.Config			= {}

function mMT:AddOptions()
	for _, func in pairs(ns.Config) do
		func()
	end
end


function mMT:Initialize()
	-- Load mTag Options
	mMT:SetupTagTextures()
	mMT:SetupTagColors()
	
	-- WoW Version Check
	mMT:mVersionCheck()
	
	-- Load Miscs
	mMT:mMisc()
	
	EP:RegisterPlugin(addon, mMT:AddOptions())
end

E:RegisterModule(mMT:GetName())