import{u as D,h as V,o as B}from"./links.C572zDFG.js";import{h as m}from"./helpers.D5tYIqKS.js";import"./default-i18n.Bd0Z306Z.js";import{_ as P}from"./_plugin-vue_export-helper.BLXtEB-G.js";import{u as L,W as N}from"./Wizard.DtIF_n8N.js";import{B as E}from"./HighlightToggle.B8dVNbkJ.js";import{G as H,a as U}from"./Row.CHjKxnPP.js";import{W as q,a as G,b as O}from"./Header.QANl02wh.js";import{W as R}from"./CloseAndExit.C7wNnyou.js";import{_ as T}from"./Steps.D4aqRKBd.js";import{v as s,c as g,B as t,l as r,o as u,a as p,C as l,t as c,F,ac as X,k as Y,aa as j,b as z}from"./runtime-core.esm-bundler.DMBo7TXk.js";import"./addons.tTxptju5.js";import"./upperFirst.BGtMw2rr.js";import"./_stringToArray.DnK4tKcY.js";import"./toString.CkyAieyd.js";import"./Checkbox.CxE2HV-P.js";import"./Checkmark.DL3UTTgg.js";import"./Logo.BIaooogV.js";import"./Caret.CGwYaMo_.js";import"./Index.CgBueMQV.js";const y=""+window.__aioseoDynamicImportPreload__("images/yoast-logo-small.BdtXmfqq.png"),M=""+window.__aioseoDynamicImportPreload__("images/rank-math-seo-logo-small.CYAnAjcu.png"),Q=""+window.__aioseoDynamicImportPreload__("svg/seopress-free-logo-small.7f-vXBQl.svg"),J=""+window.__aioseoDynamicImportPreload__("svg/seopress-pro-logo-small.Dqevy1Yh.svg"),K={setup(){const{strings:e}=L();return{rootStore:D(),setupWizardStore:V(),composableStrings:e}},components:{BaseHighlightToggle:E,GridColumn:H,GridRow:U,WizardBody:q,WizardCloseAndExit:R,WizardContainer:G,WizardHeader:O,WizardSteps:T},mixins:[N],data(){return{loading:!1,stage:"import",strings:B(this.composableStrings,{importData:this.$t.__("Import data from your current plugins",this.$td),weHaveDetected:this.$t.sprintf(this.$t.__("We have detected other SEO plugins installed on your website. Select which plugins you would like to import data to %1$s.",this.$td),"AIOSEO"),importDataAndContinue:this.$t.__("Import Data and Continue",this.$td)}),pluginImages:{"yoast-seo":m(y),"yoast-seo-premium":m(y),"rank-math-seo":m(M),seopress:m(Q),"seopress-pro":m(J)},selected:[]}},watch:{selected(e){this.setupWizardStore.importers=e.map(i=>i.slug)}},computed:{getPlugins(){return this.rootStore.aioseo.importers.filter(e=>e.canImport)}},methods:{updateValue(e,i){if(e){this.selected.push(i);return}const d=this.selected.findIndex(_=>_.value===i.value);d!==-1&&this.selected.splice(d,1)},getValue(e){return this.selected.includes(e)},isActive(e){return this.selected.findIndex(d=>d.slug===e.slug)!==-1},saveAndContinue(){this.loading=!0,this.setupWizardStore.saveWizard("importers").then(()=>{this.$router.push(this.setupWizardStore.getNextLink)})},skipStep(){this.setupWizardStore.saveWizard(),this.$router.push(this.setupWizardStore.getNextLink)}}},Z={class:"aioseo-wizard-import"},$={class:"header"},ee={class:"description"},te={class:"plugins"},oe=["alt","src"],se={key:1,class:"icon dashicons dashicons-admin-plugins"},re={class:"go-back"},ne=p("div",{class:"spacer"},null,-1);function ie(e,i,d,_,n,a){const v=s("wizard-header"),w=s("wizard-steps"),k=s("base-highlight-toggle"),S=s("grid-column"),W=s("grid-row"),h=s("router-link"),f=s("base-button"),x=s("wizard-body"),I=s("wizard-close-and-exit"),C=s("wizard-container");return u(),g("div",Z,[t(v),t(C,null,{default:r(()=>[t(x,null,{footer:r(()=>[p("div",re,[t(h,{to:_.setupWizardStore.getPrevLink,class:"no-underline"},{default:r(()=>[l("←")]),_:1},8,["to"]),l("   "),t(h,{to:_.setupWizardStore.getPrevLink},{default:r(()=>[l(c(n.strings.goBack),1)]),_:1},8,["to"])]),ne,t(f,{type:"gray",onClick:a.skipStep},{default:r(()=>[l(c(n.strings.skipThisStep),1)]),_:1},8,["onClick"]),t(f,{type:"blue",loading:n.loading,onClick:a.saveAndContinue},{default:r(()=>[l(c(n.strings.importDataAndContinue)+" →",1)]),_:1},8,["loading","onClick"])]),default:r(()=>[t(w),p("div",$,c(n.strings.importData),1),p("div",ee,c(n.strings.weHaveDetected),1),p("div",te,[t(W,null,{default:r(()=>[(u(!0),g(F,null,X(a.getPlugins,(o,b)=>(u(),Y(S,{key:b,md:"6"},{default:r(()=>[t(k,{type:"checkbox",size:"medium",round:"",active:a.isActive(o),name:o.name,modelValue:a.getValue(o),"onUpdate:modelValue":A=>a.updateValue(A,o)},{default:r(()=>[n.pluginImages[o.slug]?(u(),g("img",{key:0,alt:o.name+" Plugin Icon",src:n.pluginImages[o.slug],class:j(["icon",o.slug])},null,10,oe)):z("",!0),n.pluginImages[o.slug]?z("",!0):(u(),g("span",se)),l(" "+c(o.name),1)]),_:2},1032,["active","name","modelValue","onUpdate:modelValue"])]),_:2},1024))),128))]),_:1})])]),_:1}),t(I)]),_:1})])}const Ce=P(K,[["render",ie]]);export{Ce as default};
