import{aN as B,d as D,j as U}from"./app-core.ae890a3f.js";import{C as M}from"./Index.52399193.js";import{C as x}from"./Card.c7ceb11b.js";import{S as C}from"./Download.aee86410.js";import{_ as I}from"./_plugin-vue_export-helper.eefbdd86.js";import{aq as n,f as a,Q as u,R as s,j as d,U as i,ae as O,M as b,a0 as c,i as w,v as h}from"./vendor-vue-ui.de3ab35f.js";import{a as S,_ as t}from"./vendor-other.7b559694.js";import{C as V}from"./Blur.5e231db6.js";import{B as F}from"./Select.32af2da8.js";import{_ as A}from"./Button.a549093d.js";import{R as $}from"./RequiredPlans.c6bcf6ea.js";import{C as H}from"./ProBadge.fd60f711.js";import{C as R}from"./Index.43bf246d.js";import{_ as N}from"./Cta.8109c090.js";import{u as T}from"./AddonConditions.d0b4b606.js";import"./vendor-lodash.8e35bd59.js";import"./Close.098d4b76.js";import"./Tooltip.ae7a1028.js";import"./Caret.a017b70a.js";import"./Trash.d35f8063.js";import"./Slide.e6618126.js";import"./Row.6337df55.js";import"./Pencil.405b16d2.js";import"./SettingsRow.0c329e43.js";import"./Index.ccb02f37.js";import"./BoxToggle.cc3b8153.js";import"./CheckSolid.7f805a48.js";import"./Input.8918dec2.js";const p="aioseo-pro",W={setup(){return{localSeoStore:B()}},components:{CoreAlert:M,CoreCard:x,SvgDownload:C},data(){return{importSuccess:!1,importError:!1,options:{},plugin:null,loading:!1,strings:{importLocalSeoFromOtherPlugins:t("Import Local SEO From Other Plugins",p),importOthersDescription:S(t("Choose a plugin to import Local SEO directly into %1$s.",p),"AIOSEO"),selectPlugin:t("Select a plugin...",p),import:t("Import",p),notInstalled:t("not installed",p)}}},watch:{plugin(){this.importSuccess=!1,this.importError=!1,this.options={}}},computed:{plugins(){const r=[];return this.localSeoStore.importers.forEach(e=>{r.push({value:e.slug,label:e.name,canImport:e.canImport,version:e.version,$isDisabled:!e.installed,$isDeactivated:!e.activated})}),r},importSuccessful(){return S(t("%1$s was successfully imported!",p),this.plugin.label)},importErrorMessage(){return S(t("An error occurred while importing %1$s. Please try again.",p),this.plugin.label)},pluginMultipleLocationsWarning(){return this.plugin?.value&&["yoast-local-seo"].includes(this.plugin.value)&&this.plugin.$isDeactivated},pluginHasMultipleLocationsWarning(){return S(t("If you want multiple locations imported please make sure %1$s%2$s%3$s is activated before importing.",p),"",this.plugin?.label,"")}},methods:{processImportPlugin(){this.importSuccess=!1,this.importError=!1,this.loading=!0;const r=[];this.options.all?this.settings.filter(e=>e.value!=="all").forEach(e=>{r.push(e.value)}):Object.keys(this.options).forEach(e=>{this.options[e]&&r.push(e)}),this.localSeoStore.importPlugins([{plugin:this.plugin.value,settings:r}]).then(()=>{this.loading=!1,this.importSuccess=!0,this.options={}}).catch(()=>{this.loading=!1,this.importError=!0,this.options={}})},invalidVersion(r){return S(t("We do not support importing from the currently installed version of %1$s (%2$s). Please upgrade to the latest version and try again.",p),r.label,r.version)}}},q={class:"aioseo-section-description"},z={class:"import-plugin-label"},j={class:"plugin-label"},Q={key:0,class:"plugin-status"},Y=["innerHTML"];function G(r,e,P,L,o,l){const g=n("svg-download"),m=n("core-alert"),v=n("base-select"),_=n("base-button"),E=n("core-card");return a(),u(E,{id:"aioseo-local-seo-import-others",class:"aioseo-local-seo-import-others",slug:"importOtherPluginsLocalSeo",toggles:!1,"no-slide":"","header-text":o.strings.importLocalSeoFromOtherPlugins},{"header-icon":s(()=>[c(g)]),default:s(()=>[d("div",q,i(o.strings.importOthersDescription),1),o.importSuccess?(a(),u(m,{key:0,class:"import-success",type:"green"},{default:s(()=>[O(i(l.importSuccessful),1)]),_:1})):b("",!0),o.importError?(a(),u(m,{key:1,class:"import-error",type:"red"},{default:s(()=>[O(i(l.importErrorMessage),1)]),_:1})):b("",!0),c(v,{size:"medium",modelValue:o.plugin,"onUpdate:modelValue":e[0]||(e[0]=y=>o.plugin=y),options:l.plugins,placeholder:o.strings.selectPlugin},{option:s(({option:y})=>[d("div",z,[d("span",j,i(y.label),1),y.$isDisabled?(a(),w("span",Q,i(o.strings.notInstalled),1)):b("",!0)])]),_:1},8,["modelValue","options","placeholder"]),l.pluginMultipleLocationsWarning?(a(),u(m,{key:2,type:"blue",class:"multiple-locations-warning"},{default:s(()=>[d("span",{innerHTML:l.pluginHasMultipleLocationsWarning},null,8,Y)]),_:1})):b("",!0),c(_,{type:"blue",size:"medium",class:"import",onClick:l.processImportPlugin,disabled:!o.plugin,loading:o.loading},{default:s(()=>[O(i(o.strings.import),1)]),_:1},8,["onClick","disabled","loading"])]),_:1},8,["header-text"])}const J=I(W,[["render",G]]),k="all-in-one-seo-pack",K={components:{BaseButton:A,BaseSelect:F,CoreBlur:V},data(){return{plugin:null,strings:{importOthersDescription:S(t("Choose a plugin to import Local SEO directly into %1$s.",k),"AIOSEO"),selectPlugin:t("Select a plugin...",k),import:t("Import",k),notInstalled:t("not installed",k)}}},computed:{plugins(){return[{value:"yoast-seo",label:"yoast-seo",canImport:!1,version:"1.0.0",$isDisabled:!1}]}}},X={class:"aioseo-section-description"},Z={class:"import-plugin-label"},oo={class:"plugin-label"};function eo(r,e,P,L,o,l){const g=n("base-select"),m=n("base-button"),v=n("core-blur");return a(),u(v,null,{default:s(()=>[d("div",X,i(o.strings.importOthersDescription),1),c(g,{size:"medium",modelValue:o.plugin,"onUpdate:modelValue":e[0]||(e[0]=_=>o.plugin=_),options:l.plugins,placeholder:o.strings.selectPlugin},{option:s(({option:_})=>[d("div",Z,[d("span",oo,i(_.label),1)])]),_:1},8,["modelValue","options","placeholder"]),c(m,{type:"blue",size:"medium",class:"import"},{default:s(()=>[O(i(o.strings.import),1)]),_:1})]),_:1})}const to=I(K,[["render",eo]]),f="all-in-one-seo-pack",so={setup(){return{licenseStore:U()}},components:{SvgDownload:C,Blur:to,Cta:R,CoreCard:x,CoreProBadge:H,RequiredPlans:$},data(){return{links:D,importSuccess:!1,importError:!1,options:{},plugin:null,loading:!1,strings:{importLocalSeoFromOtherPlugins:t("Import Local SEO From Other Plugins",f),ctaButtonText:t("Unlock Local SEO",f),ctaHeader:S(t("Local SEO is a %1$s Feature",f),"PRO"),ctaDescription:t("Import your Local SEO settings and locations from other plugins.",f)},features:[t("Yoast SEO",f),t("Rank Math SEO",f),t("SEOPress",f)]}},computed:{plugins(){return[{value:"yoast-seo",label:"yoast-seo",canImport:!1,version:"1.0.0",$isDisabled:!1}]}}};function ro(r,e,P,L,o,l){const g=n("svg-download"),m=n("core-pro-badge"),v=n("blur"),_=n("required-plans"),E=n("cta"),y=n("core-card");return a(),u(y,{class:"aioseo-local-seo-import-others-lite",slug:"importOtherPluginsLocalSeo",toggles:!1,"no-slide":""},{"header-icon":s(()=>[c(g)]),header:s(()=>[d("span",null,i(o.strings.importLocalSeoFromOtherPlugins),1),c(m)]),default:s(()=>[c(v),c(E,{"cta-link":o.links.getPricingUrl("local-seo","local-seo-upsell","import","liteUpgrade"),"button-text":o.strings.ctaButtonText,"learn-more-link":o.links.getUpsellUrl("local-seo","local-seo-upsell","liteUpgrade"),"feature-list":o.features,"hide-bonus":!L.licenseStore.isUnlicensed},{"header-text":s(()=>[O(i(o.strings.ctaHeader),1)]),description:s(()=>[c(_,{addon:"aioseo-local-business"}),O(" "+i(o.strings.ctaDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list","hide-bonus"])]),_:1})}const no=I(so,[["render",ro]]),Vo={__name:"Import",setup(r){const e="all-in-one-seo-pack",{shouldShowActivate:P,shouldShowLite:L,shouldShowMain:o,shouldShowUpdate:l}=T({addonSlug:"aioseo-local-business"}),g={importLocalSeoFromOtherPlugins:t("Import Local SEO From Other Plugins",e)};return(m,v)=>(a(),w("div",null,[h(o)?(a(),u(h(J),{key:0})):b("",!0),h(l)||h(P)?(a(),u(h(N),{key:1,"card-slug":"localBusinessImport","header-text":g.importLocalSeoFromOtherPlugins},null,8,["header-text"])):b("",!0),h(L)?(a(),u(h(no),{key:2})):b("",!0)]))}};export{Vo as default};