import{b as P,H as B}from"./index.6205915e.js";import{m}from"./helpers.7981a424.js";import{u as L}from"./Wizard.3a3eef07.js";import{B as N}from"./HighlightToggle.cd602d8b.js";import{G as H,a as E}from"./Row.8a74cb5b.js";import{W as U,a as G,b as O}from"./Header.4e316309.js";import{W as R}from"./CloseAndExit.19db804d.js";import{_ as T}from"./Steps.8c31491a.js";import"./translations.e71e2202.js";import{_ as F}from"./_plugin-vue_export-helper.eefbdd86.js";import{u as q}from"./SetupWizardStore.9eae9488.js";import{_ as h,a as M}from"./default-i18n.65d58dd6.js";import{a3 as g,q as t,w as s,a7 as r,o as u,a4 as p,a as l,t as c,F as j,af as J,c as K,ae as Q,b as y}from"./runtime-core.esm-bundler.50cb9e6d.js";import"./addons.e4da3407.js";import"./upperFirst.ef347579.js";import"./Checkbox.257eede7.js";import"./Checkmark.6216abdd.js";import"./runtime-dom.esm-bundler.36191dca.js";import"./Radio.77d8ed70.js";import"./Logo.3db92090.js";import"./Index.c396c06e.js";import"./Close.650e0e8f.js";const k=""+window.__aioseoDynamicImportPreload__("images/yoast-logo-small.5db5799f.png"),X=""+window.__aioseoDynamicImportPreload__("images/rank-math-seo-logo-small.98027023.png"),Y=""+window.__aioseoDynamicImportPreload__("svg/seopress-free-logo-small.3b7febd7.svg"),Z=""+window.__aioseoDynamicImportPreload__("svg/seopress-pro-logo-small.ea7afcb5.svg"),f="all-in-one-seo-pack",$={setup(){const{strings:e}=L({stage:"import"});return{composableStrings:e,rootStore:P(),setupWizardStore:q()}},components:{BaseHighlightToggle:N,GridColumn:H,GridRow:E,WizardBody:U,WizardCloseAndExit:R,WizardContainer:G,WizardHeader:O,WizardSteps:T},data(){return{loading:!1,strings:B(this.composableStrings,{importData:h("Import data from your current plugins",f),weHaveDetected:M(h("We have detected other SEO plugins installed on your website. Select which plugins you would like to import data to %1$s.",f),"AIOSEO"),importDataAndContinue:h("Import Data and Continue",f)}),pluginImages:{"yoast-seo":m(k),"yoast-seo-premium":m(k),"rank-math-seo":m(X),seopress:m(Y),"seopress-pro":m(Z)},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)}}},ee={class:"aioseo-wizard-import"},te={class:"header"},oe={class:"description"},se={class:"plugins"},re=["alt","src"],ae={key:1,class:"icon dashicons dashicons-admin-plugins"},ne={class:"go-back"},ie=p("div",{class:"spacer"},null,-1);function le(e,n,d,_,a,i){const v=r("wizard-header"),S=r("wizard-steps"),b=r("base-highlight-toggle"),I=r("grid-column"),W=r("grid-row"),w=r("router-link"),z=r("base-button"),x=r("wizard-body"),C=r("wizard-close-and-exit"),A=r("wizard-container");return u(),g("div",ee,[t(v),t(A,null,{default:s(()=>[t(x,null,{footer:s(()=>[p("div",ne,[t(w,{to:_.setupWizardStore.getPrevLink,class:"no-underline"},{default:s(()=>[l("←")]),_:1},8,["to"]),l("   "),t(w,{to:_.setupWizardStore.getPrevLink},{default:s(()=>[l(c(a.strings.goBack),1)]),_:1},8,["to"])]),ie,t(z,{type:"gray",onClick:i.skipStep},{default:s(()=>[l(c(a.strings.skipThisStep),1)]),_:1},8,["onClick"]),t(z,{type:"blue",loading:a.loading,onClick:i.saveAndContinue},{default:s(()=>[l(c(a.strings.importDataAndContinue)+" →",1)]),_:1},8,["loading","onClick"])]),default:s(()=>[t(S),p("div",te,c(a.strings.importData),1),p("div",oe,c(a.strings.weHaveDetected),1),p("div",se,[t(W,null,{default:s(()=>[(u(!0),g(j,null,J(i.getPlugins,(o,D)=>(u(),K(I,{key:D,md:"6"},{default:s(()=>[t(b,{type:"checkbox",size:"medium",round:"",active:i.isActive(o),name:o.name,modelValue:i.getValue(o),"onUpdate:modelValue":V=>i.updateValue(V,o)},{default:s(()=>[a.pluginImages[o.slug]?(u(),g("img",{key:0,alt:o.name+" Plugin Icon",src:a.pluginImages[o.slug],class:Q(["icon",o.slug])},null,10,re)):y("",!0),a.pluginImages[o.slug]?y("",!0):(u(),g("span",ae)),l(" "+c(o.name),1)]),_:2},1032,["active","name","modelValue","onUpdate:modelValue"])]),_:2},1024))),128))]),_:1})])]),_:1}),t(C)]),_:1})])}const Ve=F($,[["render",le]]);export{Ve as default};
