import{Eb as M,Fb as C}from"./cli-0.5.12-2zcpj03a.mjs";import{JD as m,LD as v,km as _,lm as x,uF as T,vF as h}from"./cli-0.5.12-zc0qwdy2.mjs";import"./cli-0.5.12-whfz3xsx.mjs";import"./cli-0.5.12-z100r543.mjs";import"./cli-0.5.12-bzab36pn.mjs";import"./cli-0.5.12-pp1549k7.mjs";import"./cli-0.5.12-9mq24qzr.mjs";import"./cli-0.5.12-7repzgzv.mjs";import"./cli-0.5.12-pdqnfqg3.mjs";import"./cli-0.5.12-c2yq69h9.mjs";import"./cli-0.5.12-kez9r81a.mjs";import"./cli-0.5.12-zbcr8cbk.mjs";import"./cli-0.5.12-2wf629mh.mjs";import"./cli-0.5.12-ghtxkxqx.mjs";import"./cli-0.5.12-xg7a0dy4.mjs";import"./cli-0.5.12-s0h788we.mjs";import"./cli-0.5.12-m22yxpb9.mjs";import"./cli-0.5.12-cw1qs4bg.mjs";import"./cli-0.5.12-yq8ds97a.mjs";import"./cli-0.5.12-qew4mzgp.mjs";import"./cli-0.5.12-gwg1e43k.mjs";import"./cli-0.5.12-36swspqa.mjs";import"./cli-0.5.12-4dn79vqp.mjs";import"./cli-0.5.12-f5pfjvdk.mjs";import{YX as p,_V as u,rX as U,tX as z}from"./cli-0.5.12-fqp5s15p.mjs";import"./cli-0.5.12-rc1p9wk6.mjs";import"./cli-0.5.12-x479axrj.mjs";import"./cli-0.5.12-ysy6e9rz.mjs";import"./cli-0.5.12-cqv7z22w.mjs";import"./cli-0.5.12-7cn41yy7.mjs";import"./cli-0.5.12-34cd39ve.mjs";import"./cli-0.5.12-m2gh4ewc.mjs";import{AZ as D,BZ as w,CZ as H,DZ as y}from"./cli-0.5.12-c6whkxmz.mjs";import{EZ as P}from"./cli-0.5.12-w3hy6c60.mjs";import"./cli-0.5.12-5d3qcvf5.mjs";import"./cli-0.5.12-f141d2qa.mjs";import"./cli-0.5.12-khvy67r3.mjs";import"./cli-0.5.12-pycnjaeg.mjs";import"./cli-0.5.12-8v5w8znc.mjs";import"./cli-0.5.12-ctqkj6ve.mjs";import"./cli-0.5.12-cbevkwg4.mjs";import"./cli-0.5.12-w00qj83e.mjs";import"./cli-0.5.12-nbcjwzzn.mjs";import"./cli-0.5.12-3t06hwwh.mjs";import"./cli-0.5.12-057c2cp2.mjs";import"./cli-0.5.12-ecgx5n54.mjs";import{E8 as E,R8 as j}from"./cli-0.5.12-g4wb8mj2.mjs";import"./cli-0.5.12-vp5smcs1.mjs";import"./cli-0.5.12-y2kq7fe8.mjs";import"./cli-0.5.12-7vxpqr5a.mjs";import"./cli-0.5.12-hvtcdcev.mjs";import"./cli-0.5.12-asbn3d19.mjs";import"./cli-0.5.12-k1crwtdc.mjs";import"./cli-0.5.12-2jxq8gnm.mjs";import"./cli-0.5.12-p5ps8gf0.mjs";import"./cli-0.5.12-hp0508v9.mjs";import"./cli-0.5.12-tfdwzg37.mjs";import"./cli-0.5.12-60w1a0bs.mjs";import"./cli-0.5.12-c8f4daey.mjs";import"./cli-0.5.12-0qasc0ef.mjs";import"./cli-0.5.12-f8850v2j.mjs";import"./cli-0.5.12-495d826j.mjs";import"./cli-0.5.12-rt0k97yj.mjs";import"./cli-0.5.12-1vyz0tt9.mjs";import{Yna as B}from"./cli-0.5.12-xzeb7mtb.mjs";p();j();var S=B(u(),1),W=B(P(),1);v();x();h();y();function e(L){let f=S.c(18),{targetRepo:G,initialPaths:b,onSelectPath:X,onCancel:I}=L,[q,R]=W.useState(b),[J,F]=W.useState(null),[Y,V]=W.useState(!1),N;if(f[0]!==q||f[1]!==I||f[2]!==X||f[3]!==G)N=async(k)=>{if(k==="cancel"){I();return}if(V(!0),F(null),await M(k,G)){X(k);return}C(G,k);let c=q.filter((d)=>d!==k);R(c),V(!1),F(`${E(k)} no longer contains the correct repository. Select another path.`)},f[0]=q,f[1]=I,f[2]=X,f[3]=G,f[4]=N;else N=f[4];let Z=N,O;if(f[5]!==q){let k;if(f[7]===Symbol.for("react.memo_cache_sentinel"))k={label:"Cancel",value:"cancel"},f[7]=k;else k=f[7];O=[...q.map(g),k],f[5]=q,f[6]=O}else O=f[6];let A=O,K;if(f[8]!==q.length||f[9]!==J||f[10]!==Z||f[11]!==A||f[12]!==G||f[13]!==Y)K=q.length>0?H(D,{children:[H(U,{flexDirection:"column",gap:1,children:[J&&w(z,{color:"error",children:J}),H(z,{children:["Open Claudin in ",w(z,{bold:!0,children:G}),":"]})]}),Y?H(U,{children:[w(T,{}),w(z,{children:" Validating repository…"})]}):w(m,{options:A,onChange:(k)=>void Z(k)})]}):H(U,{flexDirection:"column",gap:1,children:[J&&w(z,{color:"error",children:J}),H(z,{dimColor:!0,children:["Run claude --teleport from a checkout of ",G]})]}),f[8]=q.length,f[9]=J,f[10]=Z,f[11]=A,f[12]=G,f[13]=Y,f[14]=K;else K=f[14];let Q;if(f[15]!==I||f[16]!==K)Q=w(_,{title:"Teleport to Repo",onCancel:I,color:"background",children:K}),f[15]=I,f[16]=K,f[17]=Q;else Q=f[17];return Q}function g(L){return{label:H(z,{children:["Use ",w(z,{bold:!0,children:E(L)})]}),value:L}}export{e as TeleportRepoMismatchDialog};
