local GlobalAddonName, BH = ...

local localization = BH.L
BH.Ldef = localization

BH.L = setmetatable({}, {__index=function (t, k)
	return localization[k] or k
end})

--[[
enGB +
enUS +
frFR +
]]

local L = localization

local GetClassInfo,GetSpecializationInfoByID,EJ_GetInstanceInfo = GetClassInfo,GetSpecializationInfoByID,EJ_GetInstanceInfo

--- Class Names
local classLocalizate = {
	["WARRIOR"] = GetClassInfo(1),
	["PALADIN"] = GetClassInfo(2),
	["HUNTER"] = GetClassInfo(3),
	["ROGUE"] = GetClassInfo(4),
	["PRIEST"] = GetClassInfo(5),
	["DEATHKNIGHT"] = GetClassInfo(6),
	["SHAMAN"] = GetClassInfo(7),
	["MAGE"] = GetClassInfo(8),
	["WARLOCK"] = GetClassInfo(9),
	["MONK"] = GetClassInfo(10),
	["DRUID"] = GetClassInfo(11),
	["DEMONHUNTER"] = GetClassInfo(12),
	["PET"] = PETS,
	["NO"] = SPECIAL,
	["ALL"] = ALL_CLASSES,
}
L.classLocalizate = setmetatable({}, {__index=function (t, k)
	return classLocalizate[k] or k
end})

--- Spec Names
local specCodeToID = {
	["MAGEDPS1"] = 62,
	["MAGEDPS2"] = 63,
	["MAGEDPS3"] = 64,
	["PALADINHEAL"] = 65,
	["PALADINTANK"] = 66,
	["PALADINDPS"] = 70,
	["WARRIORDPS1"] = 71,
	["WARRIORDPS2"] = 72,
	["WARRIORTANK"] = 73,
	["DRUIDDPS1"] = 102,
	["DRUIDDPS2"] = 103,
	["DRUIDTANK"] = 104,
	["DRUIDHEAL"] = 105,
	["DEATHKNIGHTTANK"] = 250,
	["DEATHKNIGHTDPS1"] = 251,
	["DEATHKNIGHTDPS2"] = 252,
	["HUNTERDPS1"] = 253,
	["HUNTERDPS2"] = 254,
	["HUNTERDPS3"] = 255,
	["PRIESTHEAL1"] = 256,
	["PRIESTHEAL2"] = 257,
	["PRIESTDPS"] = 258,
	["ROGUEDPS1"] = 259,
	["ROGUEDPS2"] = 260,
	["ROGUEDPS3"] = 261,
	["SHAMANDPS1"] = 262,
	["SHAMANDPS2"] = 263,
	["SHAMANHEAL"] = 264,
	["WARLOCKDPS1"] = 265,
	["WARLOCKDPS2"] = 266,
	["WARLOCKDPS3"] = 267,
	["MONKTANK"] = 268,
	["MONKDPS"] = 269,
	["MONKHEAL"] = 270,
	["DEMONHUNTERDPS"] = 577,
	["DEMONHUNTERTANK"] = 581,
}

local specLocalizate = {
	["NO"] = ALL_SPECS,
}
for specCode,specID in pairs(specCodeToID) do
	local _,specName = GetSpecializationInfoByID(specID)
	specLocalizate[specCode] = specName
end

L.specLocalizate = setmetatable({}, {__index=function (t, k)
	return specLocalizate[k] or k
end})

--- Raid Target Icon [ENG]
L.raidtargeticon1_eng = "{star}"
L.raidtargeticon2_eng = "{circle}"
L.raidtargeticon3_eng = "{diamond}"
L.raidtargeticon4_eng = "{triangle}"
L.raidtargeticon5_eng = "{moon}"
L.raidtargeticon6_eng = "{square}"
L.raidtargeticon7_eng = "{cross}"
L.raidtargeticon8_eng = "{skull}"

for i=1,8 do
	L['raidtargeticon'..i] = "{"..(_G['RAID_TARGET_'..i]:lower()).."}"
end


--- Raid Target Icon [FR]
L.raidtargeticon1_fr = "{étoile}"
L.raidtargeticon2_fr = "{cercle}"
L.raidtargeticon3_fr = "{losange}"
L.raidtargeticon4_fr = "{triangle}"
L.raidtargeticon5_fr = "{lune}"
L.raidtargeticon6_fr = "{carré}"
L.raidtargeticon7_fr = "{croix}"
L.raidtargeticon8_fr = "{crâne}"


--- Random strings
L.YesText = YES
L.NoText = NO


--- Boss names
local bossEJids = {
	sooitemssooboss1 = 852,
	sooitemssooboss2 = 849,
	sooitemssooboss3 = 866,
	sooitemssooboss4 = 867,
	sooitemssooboss5 = 868,
	sooitemssooboss6 = 864,
	sooitemssooboss7 = 856,
	sooitemssooboss8 = 850,
	sooitemssooboss9 = 846,
	sooitemssooboss10 = 870,
	sooitemssooboss11 = 851,
	sooitemssooboss12 = 865,
	sooitemssooboss13 = 853,
	sooitemssooboss14 = 869,
	sooitemstotboss1 = 827,
	sooitemstotboss2 = 819,
	sooitemstotboss3 = 816,
	sooitemstotboss4 = 825,
	sooitemstotboss5 = 821,
	sooitemstotboss6 = 828,
	sooitemstotboss7 = 818,
	sooitemstotboss8 = 820,
	sooitemstotboss9 = 824,
	sooitemstotboss10 = 817,
	sooitemstotboss11 = 829,
	sooitemstotboss12 = 832,
	sooitemstotboss13 = 831,
	RaidLootHighmaulBoss1 = 1128,
	RaidLootHighmaulBoss2 = 971,
	RaidLootHighmaulBoss3 = 1195,
	RaidLootHighmaulBoss4 = 1196,
	RaidLootHighmaulBoss5 = 1148,
	RaidLootHighmaulBoss6 = 1153,
	RaidLootHighmaulBoss7 = 1197,
	RaidLootBFBoss1 = 1161,
	RaidLootBFBoss2 = 1202,
	RaidLootBFBoss3 = 1122,
	RaidLootBFBoss4 = 1123,
	RaidLootBFBoss5 = 1155,
	RaidLootBFBoss6 = 1147,
	RaidLootBFBoss7 = 1154,
	RaidLootBFBoss8 = 1162,
	RaidLootBFBoss9 = 1203,
	RaidLootBFBoss10 = 959,
	RaidLootT18HCBoss1 = 1426,
	RaidLootT18HCBoss2 = 1425,
	RaidLootT18HCBoss3 = 1392,
	RaidLootT18HCBoss4 = 1432,
	RaidLootT18HCBoss5 = 1396,
	RaidLootT18HCBoss6 = 1372,
	RaidLootT18HCBoss7 = 1433,
	RaidLootT18HCBoss8 = 1427,
	RaidLootT18HCBoss9 = 1391,
	RaidLootT18HCBoss10 = 1447,
	RaidLootT18HCBoss11 = 1394,
	RaidLootT18HCBoss12 = 1395,
	RaidLootT18HCBoss13 = 1438,
	S_BossT19N2 = 1667,
	S_BossT19S1 = 1706,
}

for prefix,eID in pairs(bossEJids) do
	L[prefix] = EJ_GetEncounterInfo(eID)
end

local zoneEJids = {
	sooitemst15 = 362,
	sooitemst16 = 369,
	RaidLootT17Highmaul = 477,
	RaidLootT17BF = 457,
	RaidLootT18HC = 669,
	S_ZoneT19Nightmare = 768,
	S_ZoneT19ToV = 861,
	S_ZoneT19Suramar = 786,
	S_ZoneT20ToS = 875,
	S_ZoneT21A = 946,
	S_ZoneT22Uldir = 1031,
	S_ZoneT23Siege = 1176,
	S_ZoneT23Storms = 1177,
	S_ZoneT24Eternal = 1179,
	S_ZoneT25Nyalotha = 1180,
}
for prefix,eID in pairs(zoneEJids) do
	L[prefix] = EJ_GetInstanceInfo(eID)
end

local encounterIDtoEJidData = {
	[2334] = 2369,	--Prophet Skitra
}
L.encounterID = 2334

local encounterIDtoEJidChache = {
}

L.bossName = setmetatable({}, {__index=function (t, k)
	if not encounterIDtoEJidChache[k] then
		encounterIDtoEJidChache[k] = EJ_GetEncounterInfo(encounterIDtoEJidData[k] or 0) or ""
	end
	return encounterIDtoEJidChache[k]
end})


local instanceIDtoEJidChache = {
}
L.EJInstanceName = setmetatable({}, {__index=function (t, k)
	if not instanceIDtoEJidChache[k] then
		instanceIDtoEJidChache[k] = EJ_GetInstanceInfo(k) or ""
	end
	return instanceIDtoEJidChache[k]
end})


L.InspectViewerTalents = TALENTS
