import{u as D,f as V,n as P}from"./links.4e9269a4.js";import{n as m}from"./isArrayLikeObject.76f0d098.js";import"./default-i18n.41786823.js";import{u as B,W as L}from"./Wizard.5b4d0206.js";import{r as s,c as g,d as t,w as r,o as u,a as p,g as l,t as c,F as N,h as E,b as H,n as U,f as y}from"./vue.runtime.esm-bundler.1bf81f69.js";import{_ as G}from"./_plugin-vue_export-helper.4292a25a.js";import"./index.cd7fac8b.js";import"./Caret.0b57d359.js";import{G as O,a as R}from"./Row.1358a527.js";/* empty css                                              */import"./constants.a78fc4cb.js";import{B as T}from"./HighlightToggle.37f6159f.js";import{W as F,a as M,b as j}from"./Header.ba2ba960.js";import{W as q,_ as J}from"./Steps.55550672.js";import"./addons.b699e1f7.js";import"./upperFirst.65f07810.js";import"./_stringToArray.4de3b1f3.js";import"./toString.16b91dfe.js";import"./Index.d52a1c7e.js";/* empty css                                              *//* empty css                                            */import"./Checkbox.1a2fc75a.js";import"./Checkmark.20d31f86.js";import"./Logo.1d111e7b.js";const z=""+window.__aioseoDynamicImportPreload__("images/yoast-logo-small.d61ba0ec.png"),K=""+window.__aioseoDynamicImportPreload__("images/rank-math-seo-logo-small.ca2c09ed.png"),Q=""+window.__aioseoDynamicImportPreload__("svg/seopress-free-logo-small.ac91e892.svg"),X=""+window.__aioseoDynamicImportPreload__("svg/seopress-pro-logo-small.6e7e5cab.svg");const Y={setup(){const{strings:e}=B();return{rootStore:D(),setupWizardStore:V(),composableStrings:e}},components:{BaseHighlightToggle:T,GridColumn:O,GridRow:R,WizardBody:F,WizardCloseAndExit:q,WizardContainer:M,WizardHeader:j,WizardSteps:J},mixins:[L],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(z),"yoast-seo-premium":m(z),"rank-math-seo":m(K),seopress:m(Q),"seopress-pro":m(X)},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"),b=s("wizard-container");return u(),g("div",Z,[t(w),t(b,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(N,null,E(a.getPlugins,(o,C)=>(u(),H(S,{key:C,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:U(["icon",o.slug])},null,10,oe)):y("",!0),n.pluginImages[o.slug]?y("",!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 Ve=G(Y,[["render",ie]]);export{Ve as default};
