-- << DETAILS >>

local details = {
	
	{
	{0, "Colors"};
	};
	
	{
	{0, "Qualifiers (select certain players)"};
	{"Me"};
	{"All"};
	{"Random"};
	{"Admins/NonAdmins"};
	{"Friends/NonFriends"};
	{"NBC/BC/TBC/OBC/Premium(prem)"};
	{"R6/R15"};
	{"Rthro/NonRthro"};
	{"@(RankName)"};
	{"%(TeamName)"};
	};
	
	{
	{0, "Shortcuts"};
	{"' (Quote) to toggle cmdbar (computer)"};
	{"; (Semicolon) to toggle cmdbar2 (computer)"};
	--{"Double-jump to toggle flight (m & c)"};
	};
	
	{
	{0, "Tips"};
	{"/e for silent commands   (/e ;jump me)"};
	{"Batch commands   (;jump me ;kill me)"};
	{"Select multiple players   (;jump me,bc,r15)"};
	{"Shorten names   (;jump ForeverHD = ;jump for)"};
	{"Cases do not matter   (;jUmP mE = ;jump me)"};
	};
	
}
local colorId
for i,v in pairs(details) do
	if v[1][1] == 0 and v[1][2] == "Colors" then
		colorId = i
	end
end
for i, colorInfo in pairs(main.settings.Colors) do
	local shortName = colorInfo[1]
	local fullName = colorInfo[2]
	local tag = {fullName.." ("..shortName..")"}
	table.insert(details[colorId], tag)
	table.insert(main.colors, fullName)
end

function module:CreateDetails()
	main:GetModule("cf"):ClearPage(pages.details)
	
	--Create labels
	local totalLabels = 0
	for _, detailGroup in pairs(details) do
		for i,v in pairs(detailGroup) do
			local label = templateM:Clone()
			if i == 1 then
				label.BackgroundColor3 = Color3.fromRGB(95, 95, 95)
				label.TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
				label.TextLabel.Text = v[2]
			else
				label.BackgroundColor3 = main:GetModule("cf"):GetLabelBackgroundColor(i)
				label.TextLabel.TextColor3 = Color3.fromRGB(235, 235, 235)
				label.TextLabel.Text = v[1]
			end
			label.Visible = true
			label.Parent = pages.details
			totalLabels = totalLabels + 1
		end
	end
	
	--Canvas size
	pages.details.CanvasSize = UDim2.new(0,0,0,totalLabels*templateM.AbsoluteSize.Y)
end
	



return module
