function ansi(e,t,n){if(!n)return e=>e;let r=`[${e}m`,i=`[${t}m`;return e=>`${r}${e}${i}`}function ansi256(e,t){if(!t)return e=>e;let n=`[38;5;${e}m`;return e=>`${n}${e}[39m`}const UNICODE_GLYPHS={brand:`▲`,user:`▌`,reasoning:`○`,success:`✓`,error:`⨯`,warning:`⚠`,subagent:`◆`,rule:`│`,question:`?`,connection:`●`,arrow:`→`,pointer:`›`,prompt:`❯`,caret:`▏`,dot:`·`,ellipsis:`…`},ASCII_GLYPHS={brand:`>`,user:`|`,reasoning:`o`,success:`+`,error:`x`,warning:`!`,subagent:`*`,rule:`|`,question:`?`,connection:`*`,arrow:`->`,pointer:`>`,prompt:`>`,caret:`_`,dot:`-`,ellipsis:`...`},UNICODE_SPINNER=[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`],ASCII_SPINNER=[`-`,`\\`,`|`,`/`];function createTheme(i={}){let a=i.color??!0,o=i.unicode??!0;return{color:a,unicode:o,colors:{reset:ansi(0,0,a),bold:ansi(1,22,a),dim:ansi(2,22,a),italic:ansi(3,23,a),white:ansi(97,39,a),gray:ansi(90,39,a),cyan:ansi(36,39,a),green:ansi(32,39,a),red:ansi(31,39,a),yellow:ansi(33,39,a),magenta:ansi(35,39,a),blue:ansi(34,39,a),orange:ansi256(208,a)},glyph:o?UNICODE_GLYPHS:ASCII_GLYPHS,spinner:o?UNICODE_SPINNER:ASCII_SPINNER}}function detectUnicode(e=process.env){let t=e.EVE_TUI_UNICODE;return t===`0`||t===`false`?!1:t===`1`||t===`true`?!0:e.TERM===`dumb`?!1:process.platform===`win32`?!!(e.WT_SESSION||e.TERM_PROGRAM===`vscode`):!0}export{createTheme,detectUnicode};