import{u as D,h as V,o as P}from"./links.C2upUfsO.js";import{k as m}from"./helpers.D2xRWOvn.js";import"./default-i18n.Bd0Z306Z.js";import{x as s,c as g,C as t,m as r,o as u,a as p,D as l,t as c,F as B,K as L,l as N,H,d as z}from"./vue.esm-bundler.CWQFYt9y.js";import{_ as E}from"./_plugin-vue_export-helper.BN1snXvA.js";import{u as U,W as q}from"./Wizard.ByE1XH4H.js";import{B as G}from"./HighlightToggle.BqzgXXo2.js";import{G as O,a as R}from"./Row.CzuhYwfs.js";import{W as T,a as F,b as X}from"./Header.YiwE45vq.js";import{W as Y}from"./CloseAndExit.GcRy9J7M.js";import{_ as j}from"./Steps.-uw_KNXv.js";import"./addons.BNPuHzyp.js";import"./upperFirst.CP4N4hLd.js";import"./_stringToArray.DnK4tKcY.js";import"./toString.XwB3Xa5p.js";import"./Checkbox.D2dfpbIi.js";import"./Checkmark.pCOnqh_g.js";import"./Logo.DoVR4qom.js";import"./Caret.iRBf3wcH.js";import"./Index.CI2PYaF7.js";const y=""+window.__aioseoDynamicImportPreload__("images/yoast-logo-small.BdtXmfqq.png"),K=""+window.__aioseoDynamicImportPreload__("images/rank-math-seo-logo-small.CYAnAjcu.png"),M=""+window.__aioseoDynamicImportPreload__("svg/seopress-free-logo-small.7f-vXBQl.svg"),Q=""+window.__aioseoDynamicImportPreload__("svg/seopress-pro-logo-small.Dqevy1Yh.svg"),J={setup(){const{strings:e}=U();return{rootStore:D(),setupWizardStore:V(),composableStrings:e}},components:{BaseHighlightToggle:G,GridColumn:O,GridRow:R,WizardBody:T,WizardCloseAndExit:Y,WizardContainer:F,WizardHeader:X,WizardSteps:j},mixins:[q],data(){return{loading:!1,stage:"import",strings:P(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(K),seopress:m(M),"seopress-pro":m(Q)},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 w=s("wizard-header"),v=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(w),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(v),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(B,null,L(a.getPlugins,(o,b)=>(u(),N(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:H(["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=E(J,[["render",ie]]);export{Ce as default};
