import{a as l}from"./WpTable.36ecda37.js";import{n as c}from"./vueComponentNormalizer.67c9b86e.js";import"./index.7b63dad7.js";import"./SaveChanges.68e73792.js";import{b as u,m as p}from"./vuex.esm.19624049.js";import{B as d}from"./HighlightToggle.b1321ee3.js";import{G as m,a as _}from"./Row.2d17f2cd.js";import{W as g,a as h,b as v}from"./Header.73936a09.js";import{W as f,a as y}from"./Steps.911add44.js";import"./helpers.a2b0759e.js";import"./attachments.e5102eba.js";import"./cleanForSlug.7a45fb51.js";import"./isArrayLikeObject.5268a676.js";import"./constants.8bff9f56.js";import"./default-i18n.0e73c33c.js";import"./Caret.eeb84d06.js";import"./_commonjsHelpers.10c44588.js";import"./html.bcbe747e.js";import"./Index.cb09fd7a.js";import"./Checkbox.1903802a.js";import"./Checkmark.cdcd77fe.js";import"./Radio.955e0694.js";import"./Logo.8bd8cd82.js";const i=""+window.__aioseoDynamicImportPreload__("images/yoast-logo-small.d61ba0ec.png"),w=""+window.__aioseoDynamicImportPreload__("images/rank-math-seo-logo-small.ca2c09ed.png"),I=""+window.__aioseoDynamicImportPreload__("svg/seopress-free-logo-small.ac91e892.svg"),k=""+window.__aioseoDynamicImportPreload__("svg/seopress-pro-logo-small.6e7e5cab.svg");var x=function(){var t=this,o=t.$createElement,s=t._self._c||o;return s("div",{staticClass:"aioseo-wizard-import"},[s("wizard-header"),s("wizard-container",[s("wizard-body",{scopedSlots:t._u([{key:"footer",fn:function(){return[s("div",{staticClass:"go-back"},[s("router-link",{staticClass:"no-underline",attrs:{to:t.getPrevLink}},[t._v("\u2190")]),t._v(" \xA0 "),s("router-link",{attrs:{to:t.getPrevLink}},[t._v(t._s(t.strings.goBack))])],1),s("div",{staticClass:"spacer"}),s("base-button",{attrs:{type:"gray"},on:{click:t.skipStep}},[t._v(t._s(t.strings.skipThisStep))]),s("base-button",{attrs:{type:"blue",loading:t.loading},on:{click:t.saveAndContinue}},[t._v(t._s(t.strings.importDataAndContinue)+" \u2192")])]},proxy:!0}])},[s("wizard-steps"),s("div",{staticClass:"header"},[t._v(" "+t._s(t.strings.importData)+" ")]),s("div",{staticClass:"description"},[t._v(t._s(t.strings.weHaveDetected))]),s("div",{staticClass:"plugins"},[s("grid-row",t._l(t.getPlugins,function(e,a){return s("grid-column",{key:a,attrs:{md:"6"}},[s("base-highlight-toggle",{attrs:{type:"checkbox",round:"",active:t.isActive(e),name:e.name,value:t.getValue(e)},on:{input:function(n){return t.updateValue(n,e)}}},[t.pluginImages[e.slug]?s("img",{staticClass:"icon",class:e.slug,attrs:{alt:e.name+" Plugin Icon",src:t.pluginImages[e.slug]}}):t._e(),t.pluginImages[e.slug]?t._e():s("span",{staticClass:"icon dashicons dashicons-admin-plugins"}),t._v(" "+t._s(e.name)+" ")])],1)}),1)],1)],1),s("wizard-close-and-exit")],1)],1)},z=[];const C={components:{BaseHighlightToggle:d,GridColumn:m,GridRow:_,WizardBody:g,WizardCloseAndExit:f,WizardContainer:h,WizardHeader:v,WizardSteps:y},mixins:[l],data(){return{loading:!1,stage:"import",strings:{importData:this.$t.__("Import data from your current plugins",this.$td),weHaveDetected:this.$t.sprintf(this.$t.__("We have detected other SEO plugins installed on your website. Select which plugins you would like to import data to %1$s.",this.$td),"AIOSEO"),importDataAndContinue:this.$t.__("Import Data and Continue",this.$td)},pluginImages:{"yoast-seo":this.$getAssetUrl(i),"yoast-seo-premium":this.$getAssetUrl(i),"rank-math-seo":this.$getAssetUrl(w),seopress:this.$getAssetUrl(I),"seopress-pro":this.$getAssetUrl(k)},selected:[]}},watch:{selected(t){this.updateImporters(t.map(o=>o.slug))}},computed:{getPlugins(){return this.$aioseo.importers.filter(t=>t.canImport)}},methods:{...u("wizard",["updateImporters"]),...p("wizard",["saveWizard"]),updateValue(t,o){if(t){this.selected.push(o);return}const s=this.selected.findIndex(e=>e.value===o.value);s!==-1&&this.$delete(this.selected,s)},getValue(t){return this.selected.includes(t)},isActive(t){return this.selected.findIndex(s=>s.slug===t.slug)!==-1},saveAndContinue(){this.loading=!0,this.saveWizard("importers").then(()=>{this.$router.push(this.getNextLink)})},skipStep(){this.saveWizard(),this.$router.push(this.getNextLink)}}},r={};var $=c(C,x,z,!1,A,null,null,null);function A(t){for(let o in r)this[o]=r[o]}const X=function(){return $.exports}();export{X as default};
