import{u as D,h as V,p as P}from"./links.w575jfOL.js";import{h as m}from"./helpers.CXsRrhc8.js";import"./default-i18n.DXRQgkn2.js";import{_ as B}from"./_plugin-vue_export-helper.BN1snXvA.js";import{u as L,W as N}from"./Wizard.5_XUgNMm.js";import{B as E}from"./HighlightToggle.Btest0q9.js";import{G,a as H}from"./Row.Depn1REx.js";import{W as U,a as q,b as O}from"./Header.DrNAv6zA.js";import{W as R}from"./CloseAndExit.BEEdrgqI.js";import{_ as T}from"./Steps.DqRvDJQe.js";import{v as s,c as g,C as t,l as r,o as u,a as p,x as l,t as c,F,J as X,k as Y,G as j,b as z}from"./runtime-dom.esm-bundler.CWn9hmRK.js";import"./addons.CJ8lJt9v.js";import"./upperFirst.yVnsg4QL.js";import"./_stringToArray.DnK4tKcY.js";import"./toString.zLSwYOtv.js";import"./Checkbox.dOnSakMX.js";import"./Checkmark.CZaciSER.js";import"./Logo.BukaIm9R.js";import"./Caret.B8YmKvEY.js";import"./Index.Sx0bRfob.js";const y=""+window.__aioseoDynamicImportPreload__("images/yoast-logo-small.BdtXmfqq.png"),J=""+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"),K={setup(){const{strings:e}=L();return{rootStore:D(),setupWizardStore:V(),composableStrings:e}},components:{BaseHighlightToggle:E,GridColumn:G,GridRow:H,WizardBody:U,WizardCloseAndExit:R,WizardContainer:q,WizardHeader:O,WizardSteps:T},mixins:[N],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(J),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 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=B(K,[["render",ie]]);export{Ce as default};
