const DURATION = {
    genshin: 2000,
    zzz: 1900,
    dragonball: 1900,
    ikun: 1900,
};
// Basketball: a CSS-shaded 3D sphere (static highlight/shading) with only the
// seam lines on a spinning overlay — reads as a real ball rolling, not a flat disc.
const BALL = '<span class="si-bball" aria-hidden="true"><span class="si-bball-seams">' +
    '<svg viewBox="0 0 100 100"><g fill="none" stroke="#3a1d08" stroke-width="3.4" ' +
    'stroke-linecap="round"><path d="M50 4V96"/><path d="M4 50H96"/>' +
    '<path d="M50 4 Q14 50 50 96"/><path d="M50 4 Q86 50 50 96"/></g></svg></span></span>';
function inner(skin) {
    switch (skin) {
        case 'genshin':
            // ZZZ-style text loader, but with Genshin's palette — the "原神，启动" meme.
            return '<span class="si-gi-shine" aria-hidden="true"></span><span class="si-gi-text">原神，启动</span>';
        case 'zzz':
            return '<span class="si-static" aria-hidden="true"></span><span class="si-roll" aria-hidden="true"></span><span class="si-now">NOW&nbsp;LOADING</span>';
        case 'dragonball':
            // 悟空骑筋斗云 — user-supplied art whooshing across with speed lines.
            return '<span class="si-speed" aria-hidden="true"></span><img class="si-cloud" src="/assets/skins/dragonball-wukong.webp" alt="">';
        case 'ikun':
            return BALL;
        default:
            return '';
    }
}
function reducedMotion() {
    return typeof window !== 'undefined' && !!window.matchMedia?.('(prefers-reduced-motion: reduce)').matches;
}
/** Play the switch-in intro for a skin (no-op for skins without one). */
export function playSkinIntro(skin) {
    if (typeof document === 'undefined' || reducedMotion())
        return;
    const dur = DURATION[skin];
    if (!dur)
        return;
    document.getElementById('skin-intro')?.remove();
    const el = document.createElement('div');
    el.id = 'skin-intro';
    el.className = `skin-intro si-${skin}`;
    el.setAttribute('aria-hidden', 'true');
    el.style.setProperty('--si-dur', `${dur}ms`);
    el.innerHTML = inner(skin);
    document.body.appendChild(el);
    window.setTimeout(() => el.remove(), dur + 80);
}
//# sourceMappingURL=skin-intro.js.map