import{Q as u,v as V,b as B}from"./app-core.82d0a9b8.js";import{u as L}from"./Wizard.b3c1225d.js";import{B as N}from"./HighlightToggle.2b6a259c.js";import{G as U,a as E}from"./Row.42f1b009.js";import{W as H,a as O,b as R}from"./Header.a4521b7c.js";import{W as G}from"./CloseAndExit.ce4a74c5.js";import{_ as T}from"./Steps.c305e9ee.js";import{_ as M}from"./_plugin-vue_export-helper.eefbdd86.js";import{m as Q}from"./vendor-lodash.f9514987.js";import{_ as f,a as j}from"./vendor-other.2cdd5822.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 F,ad as q,Q as J,P as K,M as y,ae as d}from"./vendor-vue-ui.02763c14.js";import"./vendor-datetime.430013a3.js";import"./Checkbox.e9c7109b.js";import"./Checkmark.27028b68.js";import"./Radio.935d99b6.js";import"./Logo.c68e0df0.js";import"./Index.a7b56d13.js";import"./Close.ed64f0a2.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:Q(this.composableStrings,{importData:f("Import data from your current plugins",h),weHaveDetected:j(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 v=r("wizard-header"),S=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(v),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(S),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(),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};
