import{Y as u,w as V,b as B}from"./app-core.fa86622d.js";import{u as L}from"./Wizard.8346bef6.js";import{B as N}from"./HighlightToggle.019c7500.js";import{G as U,a as E}from"./Row.5037f897.js";import{W as H,a as O,b as R}from"./Header.4e132a8a.js";import{W as G}from"./CloseAndExit.89fb0169.js";import{_ as T}from"./Steps.3f2158dd.js";import{_ as M}from"./_plugin-vue_export-helper.eefbdd86.js";import{m as j}from"./vendor-lodash.45e85310.js";import{_ as f,a as F}from"./vendor-other.835e467b.js";import{an 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 Y,Q as q,P as J,M as y,ae as d}from"./vendor-vue-ui.ad4935f9.js";import"./Checkbox.850765ce.js";import"./Checkmark.39a3e934.js";import"./Radio.08721189.js";import"./Logo.e396c83a.js";import"./Index.10560bb6.js";import"./Close.8e99996b.js";const k=""+window.__aioseoDynamicImportPreload__("images/yoast-logo-small.5db5799f.png"),K=""+window.__aioseoDynamicImportPreload__("images/rank-math-seo-logo-small.98027023.png"),X=""+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(K),seopress:u(X),"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,Y(i.getPlugins,(s,D)=>(m(),q(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};
