import{a as i,j as c,e as s,h as e,b as o}from"./index.bd66e758.js";import{u as a}from"./SetupWizardStore.4b9e88e8.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};
