/**
 * SANDCODE Welcome Experience
 */

import chalk from 'chalk'

export function getWelcomeBanner(): string {
  const copper = chalk.hex('#B87333')
  const sand = chalk.hex('#C2B296')
  return `
  ${copper.bold('SANDCODE')} ${sand('· forge')}
  ${chalk.hex('#5F5848')('─'.repeat(50))}
`
}

export function getFirstRunMessage(): string {
  const copper = chalk.hex('#B87333')
  const sand = chalk.hex('#C2B296')
  return [
    getWelcomeBanner(),
    `  ${copper.bold('Your Code.')}`,
    `  ${copper.bold('Your Machine.')}`,
    '',
    `  ${sand('Type a prompt to begin. /help for commands.')}`,
    '',
  ].join('\n')
}

const STARTUP_TIPS = [
  '/recipe run <name> to execute a workflow template',
  'Use --session "name" to resume named sessions',
  'Memory is kept in ~/.sandcode/memory/',
  '/status for context usage and rate limits',
  '/config to change model, theme, or keybindings',
]

export function getStartupTip(): string {
  const tip = STARTUP_TIPS[Math.floor(Math.random() * STARTUP_TIPS.length)]!
  return chalk.hex('#C2B296')(tip)
}
