import{u as P,r as B}from"./index.20192476.js";import{j as m}from"./helpers.f95d5840.js";import{u as L}from"./Wizard.f85f1601.js";import{B as N}from"./HighlightToggle.6ee9eb70.js";import{G as E,a as G}from"./Row.f01f32cd.js";import{W as H,a as U,b as O}from"./Header.ba01229c.js";import{W as R}from"./CloseAndExit.d66755fe.js";import{_ as T}from"./Steps.006d7c0b.js";import"./translations.12335a6a.js";import{_ as F}from"./_plugin-vue_export-helper.249dac1d.js";import{u as j}from"./SetupWizardStore.f902c357.js";import{_ as h,s as J}from"./default-i18n.54b5d8cd.js";import{c as g,C as t,l as s,v as r,o as u,a as p,x as l,t as c,F as M,J as q,k as K,G as Q,b as y}from"./runtime-dom.esm-bundler.6789c400.js";import"./addons.9d0af6ad.js";import"./upperFirst.96c04516.js";import"./_stringToArray.08127ca9.js";import"./toString.1401d490.js";import"./Checkbox.e983780b.js";import"./Checkmark.32f79576.js";import"./Radio.e92f8160.js";import"./Logo.f6ea28bf.js";import"./Index.de83b4aa.js";import"./Caret.662da1f3.js";const k=""+window.__aioseoDynamicImportPreload__("images/yoast-logo-small.f75f1339.png"),X=""+window.__aioseoDynamicImportPreload__("images/rank-math-seo-logo-small.32ac1acd.png"),Y=""+window.__aioseoDynamicImportPreload__("svg/seopress-free-logo-small.d5198571.svg"),Z=""+window.__aioseoDynamicImportPreload__("svg/seopress-pro-logo-small.8414965f.svg"),f="all-in-one-seo-pack",$={setup(){const{strings:e}=L({stage:"import"});return{composableStrings:e,rootStore:P(),setupWizardStore:j()}},components:{BaseHighlightToggle:N,GridColumn:E,GridRow:G,WizardBody:H,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: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(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"),x=r("base-highlight-toggle"),I=r("grid-column"),W=r("grid-row"),z=r("router-link"),w=r("base-button"),C=r("wizard-body"),b=r("wizard-close-and-exit"),A=r("wizard-container");return u(),g("div",ee,[t(v),t(A,null,{default:s(()=>[t(C,null,{footer:s(()=>[p("div",ae,[t(z,{to:_.setupWizardStore.getPrevLink,class:"no-underline"},{default:s(()=>[l("←")]),_:1},8,["to"]),l("   "),t(z,{to:_.setupWizardStore.getPrevLink},{default:s(()=>[l(c(n.strings.goBack),1)]),_:1},8,["to"])]),ie,t(w,{type:"gray",onClick:i.skipStep},{default:s(()=>[l(c(n.strings.skipThisStep),1)]),_:1},8,["onClick"]),t(w,{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(),K(I,{key:D,md:"6"},{default:s(()=>[t(x,{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)):y("",!0),n.pluginImages[o.slug]?y("",!0):(u(),g("span",ne)),l(" "+c(o.name),1)]),_:2},1032,["active","name","modelValue","onUpdate:modelValue"])]),_:2},1024))),128))]),_:1})])]),_:1}),t(b)]),_:1})])}const Pe=F($,[["render",le]]);export{Pe as default};
