import{JD as h,LD as Fq,Qt as u,Rt as g,Tt as Wq,Wt as c,Xt as T,Yt as _q,Zt as r,_t as Vq,am as S,bm as Zq,cm as V,dm as $q,gm as p,hm as zq,wO as a,yO as Uq}from"./cli-0.5.12-zc0qwdy2.mjs";import{uU as d,vU as Yq}from"./cli-0.5.12-qew4mzgp.mjs";import{gV as w,hV as Nq,sV as j,tV as Qq,uV as m,wV as Xq}from"./cli-0.5.12-f5pfjvdk.mjs";import{YX as Lq,hW as v,iW as H,jW as y,rX as J,tX as N}from"./cli-0.5.12-fqp5s15p.mjs";import{AZ as _,BZ as q,CZ as G,DZ as B}from"./cli-0.5.12-c6whkxmz.mjs";import{EZ as Jq}from"./cli-0.5.12-w3hy6c60.mjs";import{J$ as b,W$ as Gq}from"./cli-0.5.12-g4wb8mj2.mjs";import{Yna as e,aoa as qq}from"./cli-0.5.12-xzeb7mtb.mjs";function mq({onThemeSelect:F,showIntroText:I=!1,helpText:X="",showHelpTextBelow:O=!1,hideEscToCancel:x=!1,skipExitHandling:$=!1,onCancel:A}){let[U]=v(),k=H(),{columns:l}=w(),Y=Q.useMemo(()=>c(),[]),Z=Y===null?T(U):null,{setPreviewTheme:K,savePreview:M,cancelPreview:R}=y(),z=u((L)=>L.settings.syntaxHighlightingDisabled??!1),E=g();j("ThemePicker",!0);let W=S("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]);m("theme:toggleSyntaxHighlighting",i,{context:"ThemePicker"});let f=d($?()=>{}: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 a(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(h,{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(Iq,{patch:Oq,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(p,{children:[q(V,{shortcut:"Enter",action:"select"}),q(V,{shortcut:"Esc",action:"cancel"})]})})}):null]});return C}var Q,Iq,Oq;var Aq=qq(()=>{Yq();Nq();Lq();Qq();Xq();Zq();Wq();Uq();Gq();Fq();zq();$q();_q();Vq();B();Q=e(Jq(),1),Iq=r,Oq={oldStart:1,newStart:1,oldLines:3,newLines:3,lines:[" function greet() {",'-  console.log("Hello, World!");','+  console.log("Hello, Claude!");'," }"]}});
export{mq as Xf,Aq as Yf};
