import{d as i,j as c,c as s,h as e,a as o}from"./index.21ff19c6.js";import{u as a}from"./SetupWizardStore.2f8477b8.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};
