import{ba as M,ca as C}from"./cli-0.5.4-7j0192jj.mjs";import{HD as m,JD as v,dm as _,em as x,kF as T,lF as h}from"./cli-0.5.4-k5fz4zd3.mjs";import"./cli-0.5.4-wbqf44ym.mjs";import"./cli-0.5.4-9ewg9gfs.mjs";import"./cli-0.5.4-we3mspgg.mjs";import"./cli-0.5.4-jzhazry0.mjs";import"./cli-0.5.4-82sw3hrw.mjs";import"./cli-0.5.4-31v143kt.mjs";import"./cli-0.5.4-1cy7wd6s.mjs";import"./cli-0.5.4-5e0pk96f.mjs";import"./cli-0.5.4-z154a7bp.mjs";import"./cli-0.5.4-ng5p0zjs.mjs";import"./cli-0.5.4-5hp7ks3t.mjs";import"./cli-0.5.4-8hdwp78f.mjs";import"./cli-0.5.4-mr9aznxx.mjs";import"./cli-0.5.4-jevfk5q7.mjs";import"./cli-0.5.4-27dzbzdy.mjs";import"./cli-0.5.4-a5bkdqqb.mjs";import"./cli-0.5.4-j2hnw539.mjs";import"./cli-0.5.4-9w59nnw4.mjs";import"./cli-0.5.4-z5d3q8kh.mjs";import"./cli-0.5.4-c0r12dqp.mjs";import"./cli-0.5.4-kqh172jk.mjs";import"./cli-0.5.4-vv4jbgkc.mjs";import{KW as U,MW as z,pX as p,rV as u}from"./cli-0.5.4-s7k1f0wc.mjs";import"./cli-0.5.4-0h0yz2k5.mjs";import"./cli-0.5.4-942dm5q1.mjs";import"./cli-0.5.4-rcmp5h4y.mjs";import"./cli-0.5.4-xdcww3x8.mjs";import"./cli-0.5.4-fq32ny1h.mjs";import"./cli-0.5.4-h1m67ngp.mjs";import"./cli-0.5.4-49erze3e.mjs";import"./cli-0.5.4-jytjks37.mjs";import{OY as D,PY as w,QY as H,RY as y}from"./cli-0.5.4-mn22gk7g.mjs";import{SY as P}from"./cli-0.5.4-5t3jj85n.mjs";import"./cli-0.5.4-5shjmmkz.mjs";import"./cli-0.5.4-zb412kkm.mjs";import"./cli-0.5.4-prfn3sxd.mjs";import"./cli-0.5.4-6xmgebmk.mjs";import"./cli-0.5.4-vjgejcrz.mjs";import"./cli-0.5.4-jqt00ywx.mjs";import"./cli-0.5.4-9e7rkd8e.mjs";import"./cli-0.5.4-jp4wtw87.mjs";import"./cli-0.5.4-hambpq58.mjs";import"./cli-0.5.4-syvgmg9g.mjs";import"./cli-0.5.4-w8ttefr5.mjs";import"./cli-0.5.4-j7kkqxv6.mjs";import"./cli-0.5.4-qrwczx7j.mjs";import"./cli-0.5.4-v2z6p9td.mjs";import{F8 as E,S8 as j}from"./cli-0.5.4-cbq01zg3.mjs";import"./cli-0.5.4-37v5fhf1.mjs";import"./cli-0.5.4-7grzwf6q.mjs";import"./cli-0.5.4-9qmek5dq.mjs";import"./cli-0.5.4-9c6r1fjg.mjs";import"./cli-0.5.4-2dw33ms6.mjs";import"./cli-0.5.4-x1fzfxmm.mjs";import"./cli-0.5.4-e822fzaq.mjs";import"./cli-0.5.4-09dvrzcr.mjs";import"./cli-0.5.4-end8wj9r.mjs";import"./cli-0.5.4-4x206j04.mjs";import"./cli-0.5.4-yd3rd9qt.mjs";import"./cli-0.5.4-sgcaw17t.mjs";import"./cli-0.5.4-jmc3bzbn.mjs";import"./cli-0.5.4-959vxhhb.mjs";import{Vma as B}from"./cli-0.5.4-aacw1src.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 Claudio 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};
