import{a as P,v as B}from"./index.684c656d.js";import{j as m}from"./helpers.2304d5ee.js";import{u as L}from"./Wizard.e3a4915e.js";import{B as N}from"./HighlightToggle.1d5d8a1c.js";import{G as H,a as E}from"./Row.755a571f.js";import{W as G,a as U,b as O}from"./Header.829e3e0f.js";import{W as R}from"./CloseAndExit.9fc4db78.js";import{_ as T}from"./Steps.3fa298a6.js";import"./translations.d159963e.js";import{_ as j}from"./_plugin-vue_export-helper.eefbdd86.js";import{u as F}from"./SetupWizardStore.8ebf5e53.js";import{_ as h,s as K}from"./default-i18n.20001971.js";import{d as g,H as t,w as s,y as r,o as u,e as p,a as l,t as c,G as M,N as q,c as J,K as Q,b as z}from"./runtime-dom.esm-bundler.d8b05b6d.js";import"./addons.20532c13.js";import"./upperFirst.d10eb25f.js";import"./toString.ddc58e67.js";import"./Checkbox.a4e60e91.js";import"./Checkmark.39dd9d2f.js";import"./Radio.351f457f.js";import"./Logo.1d87eeb5.js";import"./Index.f979fbbe.js";import"./Caret.2e43336b.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:F()}},components:{BaseHighlightToggle:N,GridColumn:H,GridRow:E,WizardBody:G,WizardCloseAndExit:R,WizardContainer:U,WizardHeader:O,WizardSteps:T},data(){return{loading:!1,strings:B(this.composableStrings,{importData:h("Import data from your current plugins",f),weHaveDetected:K(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(a=>a.slug)}},computed:{getPlugins(){return this.rootStore.aioseo.importers.filter(e=>e.canImport)}},methods:{updateValue(e,a){if(e){this.selected.push(a);return}const d=this.selected.findIndex(_=>_.value===a.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"],ne={key:1,class:"icon dashicons dashicons-admin-plugins"},ae={class:"go-back"},ie=p("div",{class:"spacer"},null,-1);function le(e,a,d,_,n,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"),y=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",ae,[t(w,{to:_.setupWizardStore.getPrevLink,class:"no-underline"},{default:s(()=>[l("←")]),_:1},8,["to"]),l("   "),t(w,{to:_.setupWizardStore.getPrevLink},{default:s(()=>[l(c(n.strings.goBack),1)]),_:1},8,["to"])]),ie,t(y,{type:"gray",onClick:i.skipStep},{default:s(()=>[l(c(n.strings.skipThisStep),1)]),_:1},8,["onClick"]),t(y,{type:"blue",loading:n.loading,onClick:i.saveAndContinue},{default:s(()=>[l(c(n.strings.importDataAndContinue)+" →",1)]),_:1},8,["loading","onClick"])]),default:s(()=>[t(S),p("div",te,c(n.strings.importData),1),p("div",oe,c(n.strings.weHaveDetected),1),p("div",se,[t(W,null,{default:s(()=>[(u(!0),g(M,null,q(i.getPlugins,(o,D)=>(u(),J(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(()=>[n.pluginImages[o.slug]?(u(),g("img",{key:0,alt:o.name+" Plugin Icon",src:n.pluginImages[o.slug],class:Q(["icon",o.slug])},null,10,re)):z("",!0),n.pluginImages[o.slug]?z("",!0):(u(),g("span",ne)),l(" "+c(o.name),1)]),_:2},1032,["active","name","modelValue","onUpdate:modelValue"])]),_:2},1024))),128))]),_:1})])]),_:1}),t(C)]),_:1})])}const Ve=j($,[["render",le]]);export{Ve as default};
