// The main screen: two schools side by side, a comparison table, and pick buttons in thumb reach.
import { html, bar } from '../ui.js';
import { COMPARE_ROWS, rowWinner, shortName, place } from '../metrics.js';
import { PROVISIONAL_GAMES } from '../elo.js';
function head(app, s, side) {
const st = app.state.stats.get(s.code);
const rank = app.rankOf(s.code);
const provisional = st.games < PROVISIONAL_GAMES;
return html`
`;
}
function table(app, a, b) {
let section = '';
const rows = [];
for (const row of COMPARE_ROWS) {
if (row.section !== section) {
section = row.section;
rows.push(html`
${section}
`);
}
const va = row.get(a, app.ctx);
const vb = row.get(b, app.ctx);
if (!va && !vb) continue;
const win = rowWinner(row, va, vb);
const cell = (v, side) => {
if (!v) return html`