import{nd as l,od as m,rd as u,sd as y}from"./cli-0.5.3-ag9z6ncw.mjs";import{FD as p,HD as b}from"./cli-0.5.3-jbzr8k4s.mjs";import{IW as s,KW as e,nX as C}from"./cli-0.5.3-842pf3t4.mjs";import{NY as i,OY as r,PY as g}from"./cli-0.5.3-vqmxwet2.mjs";import{QY as M}from"./cli-0.5.3-rch86nhn.mjs";import{Tma as h,Xma as f}from"./cli-0.5.3-0df3r78b.mjs";function T({enabled:c,onDismiss:a}){let[n,o]=k.useState(()=>c?{kind:"prompt"}:{kind:"hidden"});if(!c||n.kind==="hidden")return null;if(n.kind==="running")return r(s,{flexDirection:"column",marginBottom:1,children:[i(e,{color:"warning",bold:!0,children:"Migrating ~/.claude/ to ~/.claudio/..."}),i(e,{dimColor:!0,children:"Copying tokens, settings, theme, MCP servers, skills, agents, slash commands, plugins, and keybindings."})]});if(n.kind==="success"||n.kind==="error"){let d=n.kind==="success"?"success":"warning",t=n.kind==="success"?"Migration complete":"Migration finished with warnings";return r(s,{flexDirection:"column",marginBottom:1,children:[i(e,{color:d,bold:!0,children:t}),i(e,{children:m(n.report)})]})}return r(s,{flexDirection:"column",marginBottom:1,children:[i(e,{color:"warning",bold:!0,children:"Found Claude Code config at ~/.claude/"}),i(e,{children:"Import API tokens, settings, theme, MCP servers, skills, agents, slash commands, plugins, and keybindings into ~/.claudio/?"}),i(p,{options:[{value:"migrate",label:"Migrate now",description:"Copy tokens, settings, CLAUDE.md, skills, agents, commands, plugins, keybindings."},{value:"skip",label:"Skip — start fresh",description:"Don't ask again this profile."}],onChange:(d)=>{if(d==="skip"){u(),o({kind:"hidden"}),a?.("skipped");return}o({kind:"running"}),(async()=>{let t=await l();o({kind:t.errors.length===0?"success":"error",report:t}),a?.("migrated")})()},onCancel:()=>{o({kind:"hidden"}),a?.("skipped")},visibleOptionCount:2})]})}var k;var w=f(()=>{C();y();b();g();k=h(M(),1)});
export{T as ld,w as md};
