"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.initSelectionView = initSelectionView; const api_js_1 = require("../services/api.js"); const store_js_1 = require("../state/store.js"); const toast_js_1 = require("../ui/toast.js"); async function initSelectionView() { const cfg = (0, store_js_1.getConfig)(); const grid = document.getElementById('guildGrid'); const logoutBtn = document.getElementById('logoutBtn'); const userInfo = document.getElementById('userInfo'); if (logoutBtn && cfg) { logoutBtn.addEventListener('click', () => { window.location.href = `${cfg.baseAuth}/logout`; }); } try { const me = await api_js_1.api.me(); if (userInfo && me?.user) userInfo.textContent = `${me.user.username}#${me.user.discriminator}`; } catch { // ignore } if (!grid || !cfg) return; grid.innerHTML = '