import{W as u,z as V,b as B}from"./app-core.152db1db.js";import{u as L}from"./Wizard.1660521c.js";import{B as N}from"./HighlightToggle.f86ae7ee.js";import{G as U,a as E}from"./Row.f5276b4c.js";import{W as H,a as O,b as R}from"./Header.fd667f10.js";import{W as G}from"./CloseAndExit.7a1d2e88.js";import{_ as T}from"./Steps.7ee94222.js";import{_ as M}from"./_plugin-vue_export-helper.eefbdd86.js";import{m as j}from"./vendor-lodash.e0b5303e.js";import{_ as f,a as F}from"./vendor-other.35999c47.js";import{as as r,f as m,i as g,a0 as o,R as n,j as p,U as l,O as Q,ad as q,Q as J,P as K,M as y,ae as d}from"./vendor-vue-ui.9852a9dd.js";import"./vendor-datetime.361c8690.js";import"./Checkbox.b575d464.js";import"./Checkmark.d9057f80.js";import"./Radio.08c61318.js";import"./Logo.2283c850.js";import"./Index.46254557.js";import"./Close.13ddaab7.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"),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:F(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(X),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(Q,null,q(i.getPlugins,(s,D)=>(m(),J(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:K(["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 xe=M($,[["render",ie]]);export{xe as default};
