Module:Bracket/Wiki

local util_esports = require('Module:EsportsUtil') local util_text = require('Module:TextUtil') local Region = require('Module:Region') local Country = require('Module:Country') 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(Region(data.region):image) end if data.flag then tbl:wikitext(Country(data.flag):image) 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.playerflag then tbl:wikitext(Country(data.playerflag):image) 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