import{ba as M,ca as C}from"./cli-0.5.3-a02r42dx.mjs";import{FD as m,HD as v,bm as _,cm as x,iF as T,jF as h}from"./cli-0.5.3-jbzr8k4s.mjs";import"./cli-0.5.3-me9jkw92.mjs";import"./cli-0.5.3-bqmztzjc.mjs";import"./cli-0.5.3-ytqxzjff.mjs";import"./cli-0.5.3-h6n812td.mjs";import"./cli-0.5.3-hg8c6qbh.mjs";import"./cli-0.5.3-39jr2yrx.mjs";import"./cli-0.5.3-42e2paz8.mjs";import"./cli-0.5.3-mn45xfck.mjs";import"./cli-0.5.3-m884a3pk.mjs";import"./cli-0.5.3-4f9xxrem.mjs";import"./cli-0.5.3-gr8nsa2k.mjs";import"./cli-0.5.3-yj9nbd9d.mjs";import"./cli-0.5.3-55kd38ff.mjs";import"./cli-0.5.3-e6bjcfwg.mjs";import"./cli-0.5.3-4dbxtwh3.mjs";import"./cli-0.5.3-m0kfmb79.mjs";import"./cli-0.5.3-8zq9vdtg.mjs";import"./cli-0.5.3-vmx7agj7.mjs";import"./cli-0.5.3-h8xs2818.mjs";import"./cli-0.5.3-wcx7cnw5.mjs";import"./cli-0.5.3-9zbakvbf.mjs";import"./cli-0.5.3-hx550gz2.mjs";import{IW as U,KW as z,nX as p,pV as u}from"./cli-0.5.3-842pf3t4.mjs";import"./cli-0.5.3-wxead1ct.mjs";import"./cli-0.5.3-s1hz35ye.mjs";import"./cli-0.5.3-g0svn6bx.mjs";import"./cli-0.5.3-sfdh3pkx.mjs";import"./cli-0.5.3-d8tjnxcj.mjs";import"./cli-0.5.3-6zfw1732.mjs";import"./cli-0.5.3-ptjdgcsy.mjs";import"./cli-0.5.3-tp3jye12.mjs";import{MY as D,NY as w,OY as H,PY as y}from"./cli-0.5.3-vqmxwet2.mjs";import{QY as P}from"./cli-0.5.3-rch86nhn.mjs";import"./cli-0.5.3-zg2apr51.mjs";import"./cli-0.5.3-ngnshpb7.mjs";import"./cli-0.5.3-e58xste9.mjs";import"./cli-0.5.3-6163zevg.mjs";import"./cli-0.5.3-jmkkd5ph.mjs";import"./cli-0.5.3-1vt6twff.mjs";import"./cli-0.5.3-7017ez65.mjs";import"./cli-0.5.3-ea94acj4.mjs";import"./cli-0.5.3-3k22nqvy.mjs";import"./cli-0.5.3-63q4g3zt.mjs";import"./cli-0.5.3-dyhbm5kp.mjs";import"./cli-0.5.3-vpcrbd8n.mjs";import"./cli-0.5.3-jdw3ajfv.mjs";import"./cli-0.5.3-qg4a557t.mjs";import{D8 as E,Q8 as j}from"./cli-0.5.3-t65dek0m.mjs";import"./cli-0.5.3-kavpx97n.mjs";import"./cli-0.5.3-9bdwhdys.mjs";import"./cli-0.5.3-ttc72eq3.mjs";import"./cli-0.5.3-g75gdzrp.mjs";import"./cli-0.5.3-1rg2r7n7.mjs";import"./cli-0.5.3-6j2jk6dt.mjs";import"./cli-0.5.3-66650sba.mjs";import"./cli-0.5.3-9vh3vpap.mjs";import"./cli-0.5.3-n3cxyxpg.mjs";import"./cli-0.5.3-kbvzmaax.mjs";import"./cli-0.5.3-7wdgps7z.mjs";import"./cli-0.5.3-c8bcrqa4.mjs";import"./cli-0.5.3-qrvd6cmy.mjs";import"./cli-0.5.3-2dk1sk8w.mjs";import{Tma as B}from"./cli-0.5.3-0df3r78b.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};
