import{a as P,B}from"./index.ed1fc0db.js";import{k as m}from"./helpers.2a6f0df7.js";import{u as L}from"./Wizard.2883ab99.js";import{B as N}from"./HighlightToggle.d83d9599.js";import{G as E,a as H}from"./Row.29b591ed.js";import{W as U,a as G,b as O}from"./Header.b08e3ab0.js";import{W as R}from"./CloseAndExit.803d3d3f.js";import{_ as T}from"./Steps.67687b32.js";import"./translations.d159963e.js";import{_ as F}from"./_plugin-vue_export-helper.eefbdd86.js";import{u as M}from"./SetupWizardStore.8024d915.js";import{_ as h,s as j}from"./default-i18n.20001971.js";import{c as g,m as t,a2 as s,a6 as r,o as u,a 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.4f558f23.js";import"./addons.edaa5cfa.js";import"./upperFirst.3f8e52b4.js";import"./Checkbox.b57a023c.js";import"./Checkmark.8c62b4d7.js";import"./runtime-dom.esm-bundler.f6259c83.js";import"./Radio.1d65b0c7.js";import"./Logo.bc3c9602.js";import"./Index.f8f0baa8.js";import"./Close.8fb798f7.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};
