import{u as D,f as V,m as P}from"./links.23796d97.js";import{n as m}from"./isArrayLikeObject.22a096cb.js";import"./default-i18n.3881921e.js";import{u as B,W as L}from"./Wizard.643a0589.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.b39e1078.js";import{_ as G}from"./_plugin-vue_export-helper.b97bdf23.js";import"./index.0eabb636.js";import"./Caret.164d8058.js";import{G as O,a as R}from"./Row.5242dafa.js";/* empty css                                              */import"./constants.1758f66e.js";import{B as T}from"./HighlightToggle.ce133bc9.js";import{W as F,a as M,b as j}from"./Header.ffe54e1a.js";import{W as q,_ as J}from"./Steps.c2f35c74.js";import"./addons.afbe11a7.js";import"./upperFirst.8df5cd57.js";import"./_stringToArray.4de3b1f3.js";import"./toString.0891eb3e.js";import"./Index.4ee78e0e.js";/* empty css                                              *//* empty css                                            */import"./Checkbox.17c05fc5.js";import"./Checkmark.e0bb6305.js";import"./Logo.1077fe36.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(n=>n.slug)}},computed:{getPlugins(){return this.rootStore.aioseo.importers.filter(e=>e.canImport)}},methods:{updateValue(e,n){if(e){this.selected.push(n);return}const d=this.selected.findIndex(_=>_.value===n.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"},ie=p("div",{class:"spacer"},null,-1);function ne(e,n,d,_,i,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(i.strings.goBack),1)]),_:1},8,["to"])]),ie,t(f,{type:"gray",onClick:a.skipStep},{default:r(()=>[l(c(i.strings.skipThisStep),1)]),_:1},8,["onClick"]),t(f,{type:"blue",loading:i.loading,onClick:a.saveAndContinue},{default:r(()=>[l(c(i.strings.importDataAndContinue)+" →",1)]),_:1},8,["loading","onClick"])]),default:r(()=>[t(v),p("div",$,c(i.strings.importData),1),p("div",ee,c(i.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(()=>[i.pluginImages[o.slug]?(u(),g("img",{key:0,alt:o.name+" Plugin Icon",src:i.pluginImages[o.slug],class:U(["icon",o.slug])},null,10,oe)):y("",!0),i.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",ne]]);export{Ve as default};
