import{$t as Vq,FD as a,HD as Iq,Tl as p,Tt as g,Ul as $q,Ut as c,Vl as V,Wl as zq,Wt as _q,Zl as u,Zt as T,_l as Wq,_t as r,ai as v,au as h,bu as Fq,ci as Jq}from"./cli-0.5.3-jbzr8k4s.mjs";import{xT as S,yT as Zq}from"./cli-0.5.3-8zq9vdtg.mjs";import{JU as m,KU as Xq,LU as d,NU as Yq,xU as j,yU as Qq}from"./cli-0.5.3-hx550gz2.mjs";import{AV as w,IW as J,KW as N,nX as Nq,yV as H,zV as y}from"./cli-0.5.3-842pf3t4.mjs";import{MY as _,NY as q,OY as G,PY as B}from"./cli-0.5.3-vqmxwet2.mjs";import{QY as Lq}from"./cli-0.5.3-rch86nhn.mjs";import{E$ as b,R$ as Gq}from"./cli-0.5.3-t65dek0m.mjs";import{Tma as e,Xma as qq}from"./cli-0.5.3-0df3r78b.mjs";function mq({onThemeSelect:F,showIntroText:I=!1,helpText:X="",showHelpTextBelow:O=!1,hideEscToCancel:x=!1,skipExitHandling:$=!1,onCancel:A}){let[U]=H(),k=y(),{columns:l}=j(),Y=Q.useMemo(()=>T(),[]),Z=Y===null?r(U):null,{setPreviewTheme:K,savePreview:M,cancelPreview:R}=w(),z=g((L)=>L.settings.syntaxHighlightingDisabled??!1),E=c();m("ThemePicker",!0);let W=p("theme:toggleSyntaxHighlighting","ThemePicker","ctrl+t"),i=Q.useCallback(()=>{if(Y===null){let L=!z;b("userSettings",{syntaxHighlightingDisabled:L}),E((P)=>({...P,settings:{...P.settings,syntaxHighlightingDisabled:L}}))}},[Y,z,E]);d("theme:toggleSyntaxHighlighting",i,{context:"ThemePicker"});let f=S($?()=>{}:void 0),D=Q.useMemo(()=>[...[],{label:"Dark mode",value:"dark"},{label:"Light mode",value:"light"},{label:"Dark mode (colorblind-friendly)",value:"dark-daltonized"},{label:"Light mode (colorblind-friendly)",value:"light-daltonized"},{label:"Dark mode (ANSI colors only)",value:"dark-ansi"},{label:"Light mode (ANSI colors only)",value:"light-ansi"}],[]),o=Q.useCallback((L)=>{K(L)},[K]),n=Q.useCallback((L)=>{M(),F(L)},[M,F]),s=Q.useCallback(()=>{if(R(),$)A?.();else v(0)},[R,A,$]),t=Y==="env"?`Syntax highlighting disabled (via CLAUDE_CODE_SYNTAX_HIGHLIGHT=${process.env.CLAUDE_CODE_SYNTAX_HIGHLIGHT})`:z?`Syntax highlighting disabled (${W} to enable)`:Z?`Syntax theme: ${Z.theme}${Z.source?` (from ${Z.source})`:""} (${W} to disable)`:`Syntax highlighting enabled (${W} to disable)`,C=G(J,{flexDirection:"column",gap:1,children:[G(J,{flexDirection:"column",gap:1,children:[I?q(N,{children:"Let's get started."}):q(N,{bold:!0,color:"permission",children:"Theme"}),G(J,{flexDirection:"column",children:[q(N,{bold:!0,children:"Choose the text style that looks best with your terminal"}),X&&!O?q(N,{dimColor:!0,children:X}):null]}),q(a,{options:D,onFocus:o,onChange:n,onCancel:s,visibleOptionCount:D.length,defaultValue:k,defaultFocusValue:k})]}),G(J,{flexDirection:"column",width:"100%",children:[q(J,{flexDirection:"column",borderTop:!0,borderBottom:!0,borderLeft:!1,borderRight:!1,borderStyle:"dashed",borderColor:"subtle",children:q(Oq,{patch:Aq,dim:!1,filePath:"demo.js",firstLine:null,width:l})},U),G(N,{dimColor:!0,children:[" ",t]})]})]});if(!I)return G(_,{children:[q(J,{flexDirection:"column",children:C}),O&&X?q(J,{marginLeft:3,children:q(N,{dimColor:!0,children:X})}):null,!x?q(J,{marginTop:1,children:q(N,{dimColor:!0,italic:!0,children:f.pending?G(_,{children:["Press ",f.keyName," again to exit"]}):G(u,{children:[q(V,{shortcut:"Enter",action:"select"}),q(V,{shortcut:"Esc",action:"cancel"})]})})}):null]});return C}var Q,Oq,Aq;var Uq=qq(()=>{Zq();Qq();Nq();Xq();Yq();$q();_q();Jq();Gq();Iq();Wq();zq();Vq();Fq();B();Q=e(Lq(),1),Oq=h,Aq={oldStart:1,newStart:1,oldLines:3,newLines:3,lines:[" function greet() {",'-  console.log("Hello, World!");','+  console.log("Hello, Claude!");'," }"]}});
export{mq as eg,Uq as fg};
