
local baseUnits = {
	player = WhatsNextLocal:Localize("PLAYER"),
	target = WhatsNextLocal:Localize("TARGET"),
	targettarget = WhatsNextLocal:Localize("TARGETTARGET"),
	targettargettarget = WhatsNextLocal:Localize("TARGETTARGETTARGET"),
	pet = WhatsNextLocal:Localize("PET"),
	pettarget = WhatsNextLocal:Localize("PETTARGET"),
	focus = WhatsNextLocal:Localize("FOCUS"),
	focustarget = WhatsNextLocal:Localize("FOCUSTARGET"),
	mouseover = WhatsNextLocal:Localize("MOUSEOVER"),
	mouseovertarget = WhatsNextLocal:Localize("MOUSEOVERTARGET"),
} 

local baseGroupedUnits = {
	player = WhatsNextLocal:Localize("PLAYER"),
	pet = WhatsNextLocal:Localize("PET"),
} 

local bossUnits = {
	boss1 = format(WhatsNextLocal:Localize("BOSSFORMAT"),1),
	boss2 = format(WhatsNextLocal:Localize("BOSSFORMAT"),2),
	boss3 = format(WhatsNextLocal:Localize("BOSSFORMAT"),3),
	boss4 = format(WhatsNextLocal:Localize("BOSSFORMAT"),4),
} 

local bossTargetUnits = {
	boss1target = format(WhatsNextLocal:Localize("BOSSTARGETFORMAT"),1),
	boss2target = format(WhatsNextLocal:Localize("BOSSTARGETFORMAT"),2),
	boss3target = format(WhatsNextLocal:Localize("BOSSTARGETFORMAT"),3),
	boss4target = format(WhatsNextLocal:Localize("BOSSTARGETFORMAT"),4),
}

local arenaUnits = {
	arena1 = format(WhatsNextLocal:Localize("ARENAFORMAT"),1),
	arena2 = format(WhatsNextLocal:Localize("ARENAFORMAT"),2),
	arena3 = format(WhatsNextLocal:Localize("ARENAFORMAT"),3),
	arena4 = format(WhatsNextLocal:Localize("ARENAFORMAT"),4),
	arena5 = format(WhatsNextLocal:Localize("ARENAFORMAT"),5),
} 

local arenaTargetUnits = {
	arena1target = format(WhatsNextLocal:Localize("ARENATARGETFORMAT"),1),
	arena2target = format(WhatsNextLocal:Localize("ARENATARGETFORMAT"),2),
	arena3target = format(WhatsNextLocal:Localize("ARENATARGETFORMAT"),3),
	arena4target = format(WhatsNextLocal:Localize("ARENATARGETFORMAT"),4),
	arena5target = format(WhatsNextLocal:Localize("ARENATARGETFORMAT"),5),
}

local partyUnits = {
	party1 = format(WhatsNextLocal:Localize("PARTYFORMAT"),1),
	party2 = format(WhatsNextLocal:Localize("PARTYFORMAT"),2),
	party3 = format(WhatsNextLocal:Localize("PARTYFORMAT"),3),
	party4 = format(WhatsNextLocal:Localize("PARTYFORMAT"),4),
	party5 = format(WhatsNextLocal:Localize("PARTYFORMAT"),5),
} 

local partyTargetUnits = {
	party1target = format(WhatsNextLocal:Localize("PARTYTARGETFORMAT"),1),
	party2target = format(WhatsNextLocal:Localize("PARTYTARGETFORMAT"),2),
	party3target = format(WhatsNextLocal:Localize("PARTYTARGETFORMAT"),3),
	party4target = format(WhatsNextLocal:Localize("PARTYTARGETFORMAT"),4),
	party5target = format(WhatsNextLocal:Localize("PARTYTARGETFORMAT"),5),
}

local raidUnits = {}
for i=1,40 do
	raidUnits["raid"..i] = format(WhatsNextLocal:Localize("RAIDFORMAT"),(i < 10 and " " or "") .. i)
end
	
local raidTargetUnits = {}
for i=1,40 do
	raidTargetUnits["raid"..i.."target"] = format(WhatsNextLocal:Localize("RAIDTARGETFORMAT"),(i < 10 and " " or "") .. i)
end

local allUnits = {}
for key,value in pairs(baseUnits) do
	allUnits[key] = value
end
for key,value in pairs(bossUnits) do
	allUnits[key] = value
end
for key,value in pairs(bossTargetUnits) do
	allUnits[key] = value
end
for key,value in pairs(arenaUnits) do
	allUnits[key] = value
end
for key,value in pairs(arenaTargetUnits) do
	allUnits[key] = value
end
for key,value in pairs(partyUnits) do
	allUnits[key] = value
end
for key,value in pairs(partyTargetUnits) do
	allUnits[key] = value
end
for key,value in pairs(raidUnits) do
	allUnits[key] = value
end
for key,value in pairs(raidTargetUnits) do
	allUnits[key] = value
end

local movementValues = {
	MOVEFORWARD = WhatsNextLocal:Localize("MOVEFORWARD"),
	MOVEBACKWARD = WhatsNextLocal:Localize("MOVEBACKWARD"),
	STRAFELEFT = WhatsNextLocal:Localize("STRAFELEFT"),
	STRAFERIGHT = WhatsNextLocal:Localize("STRAFERIGHT"),
	TURNLEFT = WhatsNextLocal:Localize("TURNLEFT"),
	TURNRIGHT = WhatsNextLocal:Localize("TURNRIGHT"),
	JUMP = WhatsNextLocal:Localize("JUMP"),
	TOGGLEAUTORUN = WhatsNextLocal:Localize("TOGGLEAUTORUN"),
}

local logicBlockTypes = {
	itemBlock = WhatsNextLocal:Localize("ITEMBLOCK"),
	macroBlock = WhatsNextLocal:Localize("MACROBLOCK"),
	noteBlock = WhatsNextLocal:Localize("NOTEBLOCK"),
	spellBlock = WhatsNextLocal:Localize("SPELLBLOCK"),
	movementBlock = WhatsNextLocal:Localize("MOVEMENTBLOCK"),
}

local petModes = {
	PET_MODE_DEFENSIVE = WhatsNextLocal:Localize("DEFENSIVE"),
	PET_MODE_ASSIST = WhatsNextLocal:Localize("ASSIST"),
	PET_MODE_PASSIVE = WhatsNextLocal:Localize("PASSIVE"),
}

function GetUnitDisplayText(unit)
	return allUnits[unit] or unit
end

WhatsNext.valueLists = {
	["unitAny"] = {
		["|cFFFFFFFFBasic"] = baseUnits,
		["Arena"] = arenaUnits,
		["Arena Targets"] = arenaTargetUnits,
		["Boss"] = bossUnits,
		["Boss Targets"] = bossTargetUnits,
		["Party"] = partyUnits,
		["Party Targets"] = partyTargetUnits,
		["Raid"] = raidUnits,
		["Raid Targets"] = raidTargetUnits,
	},
	["unitGroup"] = {
		["Base"] = baseGroupedUnits,
		["Party"] = partyUnits,
		["Raid"] = raidUnits,
	},
	["movements"] = movementValues,
	["logicBlockTypes"] = logicBlockTypes,
	["petModes"] = petModes,
}