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