'use strict';

const { brand, dim } = require('./theme');

const LOGO_LINES = [
  '                                ██',
  '                                ██',
  '   ▄████▄   ██    ██   ▄████▄   ██  ██    ██',
  '  ██    ██  ██    ██  ██    ██  ██  ██    ██',
  '  ███████▀  ▐██  ██▌  ██    ██  ██  ▐██  ██▌',
  '  ██         ▐█▄▄█▌   ██    ██  ██   ▐█▄▄█▌',
  '   ▀████▀     ▀██▀     ▀████▀   ██    ▀██▀',
];

const TAGLINE = '  The power to build. The simplicity to ship.';

/**
 * Render the branded evolv ASCII logo.
 * Returns a string — never calls console.log().
 */
function displayLogo(options = {}) {
  const {
    showTagline = true,
    showVersion = true,
    version = require('../../package.json').version,
  } = options;

  const lines = [];

  lines.push('');
  for (const line of LOGO_LINES) {
    lines.push(brand(line));
  }

  if (showTagline) {
    lines.push('');
    lines.push(dim(TAGLINE));
  }

  if (showVersion) {
    lines.push('');
    lines.push(dim(`  v${version}  @evolvconsulting/evolv-coder-kit`));
  }

  lines.push('');

  return lines.join('\n');
}

module.exports = { displayLogo };
