import{u as v,q as x,a as A,j as B}from"./index.bb0afb15.js";import"./translations.d159963e.js";import{s as r,_ as e}from"./default-i18n.20001971.js";import{f as k,v as S,o as u,c as C,H as d,l,a as R,t as p,u as t,x as g,G as w,N as U,k as y,b as $}from"./runtime-dom.esm-bundler.baf35205.js";import{C as L}from"./Blur.601d8ea8.js";import{C as N}from"./Card.16558ba3.js";import{C as P}from"./ProBadge.2e262a91.js";import{C as M}from"./SettingsRow.70a7af04.js";import{C as D}from"./Index.9f340035.js";import{_ as V}from"./_plugin-vue_export-helper.eefbdd86.js";import"./helpers.80db7619.js";import"./Tooltip.78b61f71.js";import"./Caret.7cc96622.js";import"./index.7fee6f1a.js";import"./Slide.1db617da.js";import"./Row.c7b7fb90.js";import"./constants.a8a14dc3.js";const s="all-in-one-seo-pack",G=()=>{const _={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)},o=[{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:k(()=>{const a=v();return o.concat(Object.keys(a.aioseo.user.customRoles).map(i=>({label:a.aioseo.user.roles[i],name:i,description:r(e("By default the %1$s role %2$shas no access%3$s to %4$s settings.",s),a.aioseo.user.roles[i],"<strong>","</strong>","All in One SEO"),dynamic:!0})))}),strings:_}},j={class:"aioseo-access-control-lite"},H={class:"toggle"},b={__name:"AccessControl",setup(_){const o="all-in-one-seo-pack",{getRoles:f,strings:a}=G(),i=v(),n=x(a,{wpRoles:e("WP Roles (Editor, Author)",o),seoManagerRole:e("SEO Manager Role",o),seoEditorRole:e("SEO Editor Role",o),defaultSettings:e("Default settings that just work",o),granularControl:e("Granular controls per role",o),ctaButtonText:e("Unlock Access Control",o),ctaHeader:r(e("Access Control is a %1$s Feature",o),"PRO")}),h=k(()=>{const c=f.value;let m=1;for(;8>c.length;)c.push({label:e("Custom Role",o)+" "+m,name:"customRole"+m}),m++;return c});return(c,m)=>{const O=S("base-toggle");return u(),C("div",j,[d(t(N),{slug:"accessControl"},{header:l(()=>[R("span",null,p(t(n).accessControl),1),d(t(P))]),tooltip:l(()=>[g(p(t(n).tooltip),1)]),default:l(()=>[d(t(L),null,{default:l(()=>[(u(!0),C(w,null,U(h.value,E=>(u(),y(t(M),{key:E.name,name:E.label},{content:l(()=>[R("div",H,[d(O,{disabled:!0,modelValue:!0},{default:l(()=>[g(p(t(n).useDefaultSettings),1)]),_:1})])]),_:2},1032,["name"]))),128))]),_:1}),d(t(D),{"feature-list":[t(n).granularControl,t(n).wpRoles,t(n).seoManagerRole,t(n).seoEditorRole],"cta-link":t(A).getPricingUrl("access-control","access-control-upsell"),"button-text":t(n).ctaButtonText,"learn-more-link":t(A).getUpsellUrl("access-control",null,t(i).isPro?"pricing":"liteUpgrade"),"align-top":""},{"header-text":l(()=>[g(p(t(n).ctaHeader),1)]),description:l(()=>[g(p(t(n).tooltip),1)]),_:1},8,["feature-list","cta-link","button-text","learn-more-link"])]),_:1})])}}},T={setup(){return{licenseStore:B()}},components:{AccessControl:b,AccessControlLite:b}},W={class:"aioseo-access-control"};function F(_,o,f,a,i,n){const h=S("access-control",!0),c=S("access-control-lite");return u(),C("div",W,[a.licenseStore.isUnlicensed?$("",!0):(u(),y(h,{key:0})),a.licenseStore.isUnlicensed?(u(),y(c,{key:1})):$("",!0)])}const ie=V(T,[["render",F]]);export{ie as default};
