Module:Bracket/Wiki

local util_esports = require('Module:EsportsUtil') local util_text = require('Module:TextUtil') local Champion = require('Module:Champion') local m_country = require('Module:Country') local m_region = require('Module:Region') local m_team = require('Module:Team') local i18n = require('Module:i18nUtil')

local p = {}

function p.teamDisplay(tbl, data, teamstyle) local teamstyle = teamstyle or (data.player and 'onlyimagelinkedshort') or 'rightshortlinked' if data.region then tbl:wikitext(m_region.onlyimage(data.region)) end if data.flag then tbl:wikitext(m_country.onlyimage(data.flag)) end if data.team and (data.team ~= 'TBD' or not data.seed) then tbl:wikitext(m_team[teamstyle](data.team)) elseif data.seed then -- a description like "Seed 1" that should only display before a team is known tbl:wikitext(i18n.print('seed', data.seed)) end if data.champion then tbl:wikitext(Champion(data.champion):image) end if data.playerflag then tbl:wikitext(m_country.onlyimage(data.playerflag)) end if data.player then tbl:wikitext(' ',util_esports.playerLinked(data.player)) end if data.players then tbl:wikitext(' ',util_esports.playersLinked(data.players)) end if data.literal then tbl:wikitext(data.literal) end if data.footnoten then tbl:tag('sup'):wikitext(data.footnoten) end end

return p