var l=(n,r,o)=>new Promise((c,t)=>{var p=e=>{try{a(o.next(e))}catch(s){t(s)}},d=e=>{try{a(o.throw(e))}catch(s){t(s)}},a=e=>e.done?c(e.value):Promise.resolve(e.value).then(p,d);a((o=o.apply(n,r)).next())});var i=[{name:"android",icon:"fig://icon?type=android"},{name:"ios",icon:"fig://icon?type=apple"}];function m(n){return n==="ios"||n==="android"}var g={cache:{ttl:1e3*60},custom:(n,r)=>l(void 0,null,function*(){let[o,c,t]=n;if(!m(t))return[];let{stdout:p}=yield r({command:"npx",args:["capacitor","run",t,"--list"]});return p.trim().split(`
`).slice(2).map(d=>{let[a,e,s]=d.replace(/\s\s+/g,"|").split("|");return{name:s,displayName:`${a} ${e}`,icon:"\u{1F4F1}"}})})},u={name:"capacitor",description:"The Capacitor command-line interface (CLI) tool is used to develop Capacitor apps",icon:"https://capacitorjs.com/docs/img/meta/favicon.png",subcommands:[{name:"add",description:"Add a native platform project to your app",args:{name:"platform",suggestions:i}},{name:"copy",description:"Copy the web app build and Capacitor configuration file into the native platform project. Run this each time you make changes to your web app or change a configuration value",priority:51,args:{name:"platform",suggestions:i,isOptional:!0}},{name:"ls",description:"List all installed Cordova and Capacitor plugins",args:{name:"platform",suggestions:i,isOptional:!0}},{name:"open",description:"Opens the native project workspace in the specified native IDE (Xcode for iOS, Android Studio for Android)",priority:51,args:{name:"platform",suggestions:i}},{name:"run",description:"Opens the native project workspace in the specified native IDE (Xcode for iOS, Android Studio for Android)",priority:51,args:{name:"platform",suggestions:i},options:[{name:"--list",description:"Print a list of target devices available to the given platform",icon:"\u{1F4F1}"},{name:"--target",description:"Run on a specific target device",icon:"\u{1F4F1}",args:{name:"target",generators:g}}]},{name:"sync",description:"This command runs copy and then update",args:{name:"platform",suggestions:i,isOptional:!0},options:[{name:"--deployment",description:"Podfile.lock won't be deleted and pod install will use --deployment option"},{name:"--inline",description:"After syncing, all JS source maps will be inlined allowing for debugging an Android Web View in Chromium based browsers"}]},{name:"update",description:"Updates the native plugins and dependencies referenced in package.json",args:{name:"platform",suggestions:i,isOptional:!0},options:[{name:"--deployment",description:"Podfile.lock won't be deleted and pod install will use --deployment option"}]}],options:[{name:["--help","-h"],description:"Output usage information. Can be used with individual commands too",isPersistent:!0},{name:["--version","-V"],description:"Output the version number"}]},h=u;export{h as default};
