import{X as u,w as V,b as B}from"./app-core.b862f9c8.js";import{u as L}from"./Wizard.92828320.js";import{B as N}from"./HighlightToggle.ff63a064.js";import{G as U,a as E}from"./Row.2a7735dd.js";import{W as H,a as O,b as R}from"./Header.2eab4cea.js";import{W as G}from"./CloseAndExit.78443b8b.js";import{_ as T}from"./Steps.8e03baa9.js";import{_ as M}from"./_plugin-vue_export-helper.eefbdd86.js";import{m as j}from"./vendor-lodash.d3ad8b99.js";import{_ as f,a as q}from"./vendor-other.7b559694.js";import{aq as r,f as m,i as g,a0 as o,R as n,j as p,U as l,O as F,ad as Q,Q as X,P as J,M as y,ae as d}from"./vendor-vue-ui.f00a1236.js";import"./Checkbox.e62f1ba4.js";import"./Checkmark.af3294f4.js";import"./Radio.b5155ca9.js";import"./Logo.76a62e7a.js";import"./Index.08267eee.js";import"./Close.de45e465.js";const k=""+window.__aioseoDynamicImportPreload__("images/yoast-logo-small.5db5799f.png"),K=""+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"),h="all-in-one-seo-pack",$={setup(){const{strings:e}=L({stage:"import"});return{composableStrings:e,rootStore:B(),setupWizardStore:V()}},components:{BaseHighlightToggle:N,GridColumn:E,GridRow:U,WizardBody:R,WizardCloseAndExit:G,WizardContainer:O,WizardHeader:H,WizardSteps:T},data(){return{loading:!1,strings:j(this.composableStrings,{importData:f("Import data from your current plugins",h),weHaveDetected:q(f("We have detected other SEO plugins installed on your website. Select which plugins you would like to import data to %1$s.",h),"AIOSEO"),importDataAndContinue:f("Import Data and Continue",h)}),pluginImages:{"yoast-seo":u(k),"yoast-seo-premium":u(k),"rank-math-seo":u(K),seopress:u(Y),"seopress-pro":u(Z)},selected:[]}},watch:{selected(e){this.setupWizardStore.importers=e.map(t=>t.slug)}},computed:{getPlugins(){return this.rootStore.aioseo.importers.filter(e=>e.canImport)}},methods:{updateValue(e,t){if(e){this.selected.push(t);return}const c=this.selected.findIndex(_=>_.value===t.value);c!==-1&&this.selected.splice(c,1)},getValue(e){return this.selected.includes(e)},isActive(e){return this.selected.findIndex(c=>c.slug===e.slug)!==-1},saveAndContinue(){this.loading=!0,this.setupWizardStore.saveWizard("importers").then(()=>{this.$router.push(this.setupWizardStore.getNextLink)})},skipStep(){const e=this.setupWizardStore.getNextLink;this.setupWizardStore.currentStage=e.name,this.setupWizardStore.saveWizard().then(()=>{this.$router.push(e)})}}},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"};function ie(e,t,c,_,a,i){const S=r("wizard-header"),v=r("wizard-steps"),W=r("base-highlight-toggle"),b=r("grid-column"),x=r("grid-row"),z=r("router-link"),w=r("base-button"),I=r("wizard-body"),C=r("wizard-close-and-exit"),A=r("wizard-container");return m(),g("div",ee,[o(S),o(A,null,{default:n(()=>[o(I,null,{footer:n(()=>[p("div",ae,[o(z,{to:_.setupWizardStore.getPrevLink,class:"no-underline"},{default:n(()=>[...t[0]||(t[0]=[d("←",-1)])]),_:1},8,["to"]),t[1]||(t[1]=d("   ",-1)),o(z,{to:_.setupWizardStore.getPrevLink},{default:n(()=>[d(l(a.strings.goBack),1)]),_:1},8,["to"])]),t[2]||(t[2]=p("div",{class:"spacer"},null,-1)),o(w,{type:"gray",onClick:i.skipStep},{default:n(()=>[d(l(a.strings.skipThisStep),1)]),_:1},8,["onClick"]),o(w,{type:"blue",loading:a.loading,onClick:i.saveAndContinue},{default:n(()=>[d(l(a.strings.importDataAndContinue)+" →",1)]),_:1},8,["loading","onClick"])]),default:n(()=>[o(v),p("div",te,l(a.strings.importData),1),p("div",oe,l(a.strings.weHaveDetected),1),p("div",se,[o(x,null,{default:n(()=>[(m(!0),g(F,null,Q(i.getPlugins,(s,D)=>(m(),X(b,{key:D,md:"6"},{default:n(()=>[o(W,{type:"checkbox",size:"medium",round:"",active:i.isActive(s),name:s.name,modelValue:i.getValue(s),"onUpdate:modelValue":P=>i.updateValue(P,s)},{default:n(()=>[a.pluginImages[s.slug]?(m(),g("img",{key:0,alt:s.name+" Plugin Icon",src:a.pluginImages[s.slug],class:J(["icon",s.slug])},null,10,re)):y("",!0),a.pluginImages[s.slug]?y("",!0):(m(),g("span",ne)),d(" "+l(s.name),1)]),_:2},1032,["active","name","modelValue","onUpdate:modelValue"])]),_:2},1024))),128))]),_:1})])]),_:1}),o(C)]),_:1})])}const be=M($,[["render",ie]]);export{be as default};
