import{c as A,f as V,m as P}from"./links.574d4fd4.js";import{o as m}from"./isArrayLikeObject.59b68b05.js";import"./default-i18n.3881921e.js";import{x as s,c as g,C as t,l as r,o as u,a as p,D as l,t as c,F as B,L,k as N,I as E,b as y}from"./vue.runtime.esm-bundler.78401fbe.js";import{_ as H}from"./_plugin-vue_export-helper.58be9317.js";import{u as U,W as G}from"./Wizard.60040a90.js";import{B as O}from"./HighlightToggle.6d3cc7d8.js";import{G as R,a as T}from"./Row.e7795c3e.js";import{W as F,a as M,b as j}from"./Header.ccf1c291.js";import{W as q}from"./CloseAndExit.54621e48.js";import{_ as J}from"./Steps.52be0f49.js";import"./addons.f4a19c9a.js";import"./upperFirst.1bce92c5.js";import"./_stringToArray.4de3b1f3.js";import"./toString.03aff7e6.js";import"./Checkbox.66c1e532.js";import"./Checkmark.68b20c77.js";import"./Radio.76a0cae5.js";import"./Logo.9906182f.js";import"./Caret.89e18339.js";import"./Index.815fe32c.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}=U();return{rootStore:A(),setupWizardStore:V(),composableStrings:e}},components:{BaseHighlightToggle:O,GridColumn:R,GridRow:T,WizardBody:F,WizardCloseAndExit:q,WizardContainer:M,WizardHeader:j,WizardSteps:J},mixins:[G],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"),x=s("grid-row"),h=s("router-link"),f=s("base-button"),I=s("wizard-body"),W=s("wizard-close-and-exit"),b=s("wizard-container");return u(),g("div",Z,[t(w),t(b,null,{default:r(()=>[t(I,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(x,null,{default:r(()=>[(u(!0),g(B,null,L(a.getPlugins,(o,C)=>(u(),N(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":D=>a.updateValue(D,o)},{default:r(()=>[n.pluginImages[o.slug]?(u(),g("img",{key:0,alt:o.name+" Plugin Icon",src:n.pluginImages[o.slug],class:E(["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(W)]),_:1})])}const Ce=H(Y,[["render",ie]]);export{Ce as default};
