import{d as u,h as e,b as o,a as l,o as c,u as p}from"./index.684c656d.js";const g=u("ToolsStore",{actions:{clearLog(t){return e.post(o.restUrl("clear-log")).send({log:t}).then(n=>{const s=l();s.aioseo.data.logSizes[t]=n.body.logSize})},emailDebugInfo(t){return e.post(o.restUrl("email-debug-info")).send({email:t})},doTask({action:t,data:n,siteId:s}){const r=l();return e.post(o.restUrl("settings/do-task")).send({action:t,data:n,siteId:s,network:r.aioseo.data.isNetworkAdmin}).then(i=>{if(!(i!=null&&i.statusCode)||i.statusCode===400)return Promise.reject(new Error(`Task ${t} could not be completed.`))})},uploadFile({file:t,filename:n,siteId:s}){return e.post(o.restUrl(`settings/import/${s||""}`)).attach("file",t,n).then(r=>{if(r.body.license&&!s){const a=c();a.license=r.body.license,a.clearLicenseNotices()}const i=p();return i.options=r.body.options,r})},exportSettings(t){return e.post(o.restUrl("settings/export")).send(t)},exportContent(t){return e.post(o.restUrl("settings/export-content")).send(t)},resetSettings({payload:t,siteId:n}){return e.post(o.restUrl("reset-settings")).send({settings:t,siteId:n})},importPlugins(t){return e.post(o.restUrl("settings/import-plugins")).send(t)}}});export{g as u};
