import{d as i,i as c,e as s,h as e,b as o}from"./index.4b887428.js";import{u as a}from"./SetupWizardStore.f23d0bfe.js";const p=i("ConnectStore",{state:()=>({}),getters:{isConnected:()=>{var r;const n=c(),t=s();return"Lite".toLowerCase()!=="pro"&&((r=t.internalOptions.internal.siteAnalysis)==null?void 0:r.connectToken)||n.license.isActive}},actions:{getConnectUrl({key:n,wizard:t}){return e.post(o.restUrl("connect-url")).send({licenseKey:n.trim(),wizard:t})},processConnect(n){const t=a();return e.post(o.restUrl("connect-pro")).send({downloadUrl:n.file,token:n.token,wizard:n.wizard?JSON.stringify(t.wizard.$state):null})},saveConnectToken(n){return s().updateOption("internalOptions",{groups:["internal","siteAnalysis"],key:"connectToken",value:n}),e.post(o.restUrl("connect")).send({token:n})}}});export{p as u};
