"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.printHeader = void 0;
const color_1 = require("../color");
const yok_1 = require("./yok");
function printHeader() {
    if (process.env.HIDE_HEADER)
        return;
    const $staticConfig = yok_1.injector.resolve("$staticConfig");
    const version = $staticConfig.version;
    const header = [
        color_1.color.dim("│ "),
        color_1.color.cyanBright.bold("{N} NativeScript "),
        color_1.color.whiteBright.bold("CLI"),
        color_1.color.dim(` [v${version}] `),
    ].join("");
    const tagLine = [
        color_1.color.dim("│ "),
        color_1.color.dim(" → "),
        color_1.color.whiteBright.bold("Empower JavaScript with native APIs "),
    ].join("");
    const headerLength = (0, color_1.stripColors)(header).length;
    const tagLineLength = (0, color_1.stripColors)(tagLine).length;
    const width = Math.max(headerLength, tagLineLength);
    console.info("  " + color_1.color.dim("┌" + "─".repeat(width - 1) + "┐"));
    console.info("  " + header + " ".repeat(width - headerLength) + color_1.color.dim("│"));
    console.info("  " + tagLine + " ".repeat(width - tagLineLength) + color_1.color.dim("│"));
    console.info("  " + color_1.color.dim("└" + "─".repeat(width - 1) + "┘"));
}
exports.printHeader = printHeader;
