/**
 * Aery startup splash — shown briefly on first session start.
 * Simple, clean, sky blue.
 */
import { theme } from "../theme/theme.js";
const LOGO = `
    ___
   /   |  ___  _______  __
  / /| | / _ \\/ ___/ / / /
 / ___ |/  __/ /  / /_/ /
/_/  |_|\\___/_/   \\__, /
                  /____/
`.trim();
const TAGLINE = "AI coding agent for the terminal";
export class AerySplashComponent {
    tui;
    frame = 0;
    maxFrames = 20;
    disposed = false;
    timer = null;
    constructor(tui) {
        this.tui = tui;
    }
    render(width) {
        const lines = [];
        const alpha = Math.min(1, this.frame / 8);
        if (alpha < 0.1)
            return [];
        const color = theme.fg("accent");
        const dim = theme.fg("dim");
        for (const line of LOGO.split("\n")) {
            lines.push(color(line));
        }
        lines.push("");
        lines.push(dim(TAGLINE));
        lines.push("");
        return lines;
    }
    invalidate() { }
    start(onDone) {
        this.timer = setInterval(() => {
            this.frame++;
            this.tui.requestRender();
            if (this.frame >= this.maxFrames) {
                this.dispose();
                onDone();
            }
        }, 50);
    }
    dispose() {
        if (this.disposed)
            return;
        this.disposed = true;
        if (this.timer) {
            clearInterval(this.timer);
            this.timer = null;
        }
    }
}
//# sourceMappingURL=aery-splash.js.map