import{c as D,h as V,p as P}from"./links.DYfvsp_u.js";import{l as m}from"./helpers.Ccl21t4W.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.DqIKZLqK.js";import{_ as E}from"./_plugin-vue_export-helper.BN1snXvA.js";import{u as U,W as q}from"./Wizard.B1yrgHtY.js";import{B as G}from"./HighlightToggle.DakSfZ82.js";import{G as O,a as R}from"./Row.DKhn_IWV.js";import{W as T,a as F,b as X}from"./Header.BFsAjAvv.js";import{W as Y}from"./CloseAndExit.Ddpfj5X5.js";import{_ as j}from"./Steps.CjET4rCx.js";import"./addons.qvyITi11.js";import"./upperFirst.BADaHsnX.js";import"./_stringToArray.DnK4tKcY.js";import"./toString.C7L0MmPq.js";import"./Checkbox.DUOJ_PLM.js";import"./Checkmark.CUxYD2Fh.js";import"./Radio.DHWLjgLM.js";import"./Logo.OekohoeO.js";import"./Caret.CE8P-qnG.js";import"./Index.Dq2Y3sD9.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(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"),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(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(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(()=>[i.pluginImages[o.slug]?(u(),g("img",{key:0,alt:o.name+" Plugin Icon",src:i.pluginImages[o.slug],class:H(["icon",o.slug])},null,10,oe)):z("",!0),i.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 be=E(J,[["render",ne]]);export{be as default};
