import{$l as u,$t as T,HD as a,JD as Iq,Vl as p,Vt as g,Wl as $q,Wt as c,Xl as V,Yl as zq,Yt as _q,am as Wq,au as r,bi as v,bu as Vq,cu as h,di as Jq,du as Fq}from"./cli-0.5.4-k5fz4zd3.mjs";import{AT as Zq,zT as S}from"./cli-0.5.4-j2hnw539.mjs";import{AU as Qq,LU as m,MU as Xq,NU as d,PU as Yq,zU as j}from"./cli-0.5.4-vv4jbgkc.mjs";import{AV as H,BV as y,CV as w,KW as J,MW as N,pX as Nq}from"./cli-0.5.4-s7k1f0wc.mjs";import{OY as _,PY as q,QY as G,RY as B}from"./cli-0.5.4-mn22gk7g.mjs";import{SY as Lq}from"./cli-0.5.4-5t3jj85n.mjs";import{G$ as b,T$ as Gq}from"./cli-0.5.4-cbq01zg3.mjs";import{Vma as e,Zma as qq}from"./cli-0.5.4-aacw1src.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};
