import{a as P,E as B}from"./index.4b887428.js";import{k as m}from"./helpers.633a054c.js";import{u as L}from"./Wizard.9389f313.js";import{B as N}from"./HighlightToggle.51ada893.js";import{G as E,a as H}from"./Row.bb9acf3f.js";import{W as U,a as G,b as O}from"./Header.b394e22f.js";import{W as R}from"./CloseAndExit.2ea40092.js";import{_ as T}from"./Steps.2d99e187.js";import"./translations.e71e2202.js";import{_ as F}from"./_plugin-vue_export-helper.eefbdd86.js";import{u as M}from"./SetupWizardStore.f23d0bfe.js";import{_ as h,a as j}from"./default-i18n.65d58dd6.js";import{c as g,l as t,a2 as s,a6 as r,o as u,_ as p,a7 as l,$ as c,F as q,af as J,a1 as K,ae as Q,a4 as y}from"./runtime-core.esm-bundler.ce5add0b.js";import"./addons.9cee8bbb.js";import"./upperFirst.5dc701f8.js";import"./Checkbox.6a913600.js";import"./Checkmark.762f711e.js";import"./runtime-dom.esm-bundler.dc49ee3e.js";import"./Radio.b8474a23.js";import"./Logo.3715aad2.js";import"./Index.25ae8dfb.js";import"./Close.ccd53ef3.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:M()}},components:{BaseHighlightToggle:N,GridColumn:E,GridRow:H,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:j(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"),I=r("base-highlight-toggle"),W=r("grid-column"),b=r("grid-row"),z=r("router-link"),w=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(z,{to:_.setupWizardStore.getPrevLink,class:"no-underline"},{default:s(()=>[l("←")]),_:1},8,["to"]),l("   "),t(z,{to:_.setupWizardStore.getPrevLink},{default:s(()=>[l(c(a.strings.goBack),1)]),_:1},8,["to"])]),ie,t(w,{type:"gray",onClick:i.skipStep},{default:s(()=>[l(c(a.strings.skipThisStep),1)]),_:1},8,["onClick"]),t(w,{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(b,null,{default:s(()=>[(u(!0),g(q,null,J(i.getPlugins,(o,D)=>(u(),K(W,{key:D,md:"6"},{default:s(()=>[t(I,{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};
