import{c as s,m as i,b as e}from"./vuex.esm-bundler.55d3d5b3.js";import"./WpTable.3e09f0c1.js";import"./default-i18n.0e8bc810.js";import"./constants.e56e1512.js";import"./_plugin-vue_export-helper.a81c6319.js";import"./index.4dbecc01.js";import{M as n}from"./MetaTag.efe1bd7b.js";import"./SaveChanges.c85e9ba4.js";const d={computed:{...s(["settings"]),getRoles(){return this.roles.concat(Object.keys(this.$aioseo.user.customRoles).map(t=>({label:this.$aioseo.user.roles[t],name:t,description:this.$t.sprintf(this.$t.__("By default the %1$s role %2$shas no access%3$s to %4$s settings.",this.$td),this.$aioseo.user.roles[t],"<strong>","</strong>","All in One SEO"),dynamic:!0})))}}},g={mixins:[n],props:{tool:{type:Object,required:!0},isConnected:{type:Boolean,default(){return!1}}},computed:{...s(["isUnlicensed"]),...i(["options"])}},h={data(){return{installingPlugin:!1,miInstalled:!1,miInstalledFailed:!1,showMiPromo:!0}},computed:{gaActivated(){return this.$aioseo.plugins.miLite.activated||this.$aioseo.plugins.emLite.activated||this.$aioseo.plugins.miPro.activated||this.$aioseo.plugins.emPro.activated},prefersEm(){return(this.$aioseo.plugins.emLite.installed||this.$aioseo.plugins.emPro.installed)&&!this.$aioseo.plugins.miLite.installed&&!this.$aioseo.plugins.miPro.installed}},methods:{...e(["installPlugins","upgradePlugins"]),installMi(){this.installingPlugin=!0,this.installPlugins([{plugin:"miLite",type:"plugin"}]).then(t=>{if(this.installingPlugin=!1,t.body.failed.length){this.miInstalledFailed=!0;return}this.miInstalled=!0,setTimeout(()=>{this.showMiPromo=!1,this.$aioseo.plugins.miLite.activated=!0,window.aioseo.plugins.miLite.activated=!0},3e3)}).catch(t=>{console.error(t)})}}};export{d as A,h as M,g as W};
