import{u as O,z as k,b as E,j as x}from"./index.bd66e758.js";import"./translations.d159963e.js";import{s as r,_ as e}from"./default-i18n.20001971.js";import{f as $,x as f,o as u,c as h,H as d,m as l,a as b,t as p,u as t,y as m,G as B,N as U,l as S,b as A}from"./runtime-dom.esm-bundler.5d5e6b71.js";import{C as w}from"./Blur.4fe4b9a3.js";import{C as L}from"./Card.88a70537.js";import{C as N}from"./ProBadge.aeac9858.js";import{C as M}from"./SettingsRow.8aa99257.js";import{C as P}from"./Index.1a358ca4.js";import{_ as D}from"./_plugin-vue_export-helper.eefbdd86.js";import"./helpers.bf0d86e6.js";import"./Tooltip.418c677c.js";import"./Caret.382b7591.js";import"./index.eb92a2a8.js";import"./Slide.a525748d.js";import"./Row.aff98451.js";import"./constants.fe8bda37.js";const s="all-in-one-seo-pack",V=()=>{const g={tooltip:r(e("By default, only Administrators have permission to manage %1$s within WordPress. With Access Controls, you can easily extend access permissions to other user roles.",s),"AIOSEO"),accessControl:e("Access Control Settings",s),useDefaultSettings:e("Use Default Settings",s)},n=[{label:e("Administrator",s),name:"administrator",description:r(e("By default Admins have access to %1$sall SEO site settings%2$s",s),"<strong>","</strong>")},{label:e("Editor",s),name:"editor",description:r(e("By default Editors have access to %1$sSEO settings for General Settings, Search Appearance, Social Networks, and Redirects as well as all settings for individual pages and posts.%2$s",s),"<strong>","</strong>")},{label:e("Author",s),name:"author",description:r(e("By default Authors have access to %1$sSEO settings for individual pages and posts that they already have permission to edit.%2$s",s),"<strong>","</strong>")},{label:e("Contributor",s),name:"contributor",description:r(e("By default Contributors have access to %1$sSEO settings for individual pages and posts that they already have permission to edit.%2$s",s),"<strong>","</strong>")},{label:e("SEO Manager",s),name:"seoManager",description:r(e("By default SEO Managers have access to %1$sSEO settings for General Settings, Sitemaps, Link Assistant, Redirects, Local SEO, and individual pages and posts.%2$s",s),"<strong>","</strong>")},{label:e("SEO Editor",s),name:"seoEditor",description:r(e("By default SEO Editors have access to %1$sSEO settings for individual pages and posts.%2$s",s),"<strong>","</strong>")}];return{getRoles:$(()=>{const a=O();return n.concat(Object.keys(a.aioseo.user.customRoles).map(o=>({label:a.aioseo.user.roles[o],name:o,description:r(e("By default the %1$s role %2$shas no access%3$s to %4$s settings.",s),a.aioseo.user.roles[o],"<strong>","</strong>","All in One SEO"),dynamic:!0})))}),strings:g}},G={class:"aioseo-access-control-lite"},j={class:"toggle"},R={__name:"AccessControl",setup(g){const n="all-in-one-seo-pack",{getRoles:_,strings:a}=V(),o=k(a,{wpRoles:e("WP Roles (Editor, Author)",n),seoManagerRole:e("SEO Manager Role",n),seoEditorRole:e("SEO Editor Role",n),defaultSettings:e("Default settings that just work",n),granularControl:e("Granular controls per role",n),ctaButtonText:e("Unlock Access Control",n),ctaHeader:r(e("Access Control is a %1$s Feature",n),"PRO")}),C=$(()=>{const i=_.value;let c=1;for(;8>i.length;)i.push({label:e("Custom Role",n)+" "+c,name:"customRole"+c}),c++;return i});return(i,c)=>{const v=f("base-toggle");return u(),h("div",G,[d(t(L),{slug:"accessControl"},{header:l(()=>[b("span",null,p(t(o).accessControl),1),d(t(N))]),tooltip:l(()=>[m(p(t(o).tooltip),1)]),default:l(()=>[d(t(w),null,{default:l(()=>[(u(!0),h(B,null,U(C.value,y=>(u(),S(t(M),{key:y.name,name:y.label},{content:l(()=>[b("div",j,[d(v,{disabled:!0,modelValue:!0},{default:l(()=>[m(p(t(o).useDefaultSettings),1)]),_:1})])]),_:2},1032,["name"]))),128))]),_:1}),d(t(P),{"feature-list":[t(o).granularControl,t(o).wpRoles,t(o).seoManagerRole,t(o).seoEditorRole],"cta-link":t(E).getPricingUrl("access-control","access-control-upsell",null,"liteUpgrade"),"button-text":t(o).ctaButtonText,"learn-more-link":t(E).getUpsellUrl("access-control",null,"liteUpgrade"),"align-top":""},{"header-text":l(()=>[m(p(t(o).ctaHeader),1)]),description:l(()=>[m(p(t(o).tooltip),1)]),_:1},8,["feature-list","cta-link","button-text","learn-more-link"])]),_:1})])}}},H={setup(){return{licenseStore:x()}},components:{AccessControl:R,AccessControlLite:R}},T={class:"aioseo-access-control"};function W(g,n,_,a,o,C){const i=f("access-control",!0),c=f("access-control-lite");return u(),h("div",T,[a.licenseStore.isUnlicensed?A("",!0):(u(),S(i,{key:0})),a.licenseStore.isUnlicensed?(u(),S(c,{key:1})):A("",!0)])}const le=D(H,[["render",W]]);export{le as default};
