import{u as v,p as x,l as A,k as B}from"./index.7377ee90.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,C as p,l,a as R,t as d,u as t,x as g,F as w,J as U,k as y,b as $}from"./runtime-dom.esm-bundler.5c3c7d72.js";import{C as L}from"./Blur.edde4939.js";import{C as P}from"./Card.7fa0e19d.js";import{C as M}from"./ProBadge.751e0b85.js";import{C as N}from"./SettingsRow.ac18ea66.js";import{C as D}from"./Index.a76253da.js";import{_ as V}from"./_plugin-vue_export-helper.eefbdd86.js";import"./helpers.53868b98.js";import"./Tooltip.73441134.js";import"./Caret.a21d4ca8.js";import"./index.b359096c.js";import"./Slide.39c07c03.js";import"./Row.df38a5f6.js";import"./constants.a8a14dc3.js";const s="all-in-one-seo-pack",F=()=>{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:_}},G={class:"aioseo-access-control-lite"},T={class:"toggle"},b={__name:"AccessControl",setup(_){const o="all-in-one-seo-pack",{getRoles:f,strings:a}=F(),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",G,[p(t(P),{slug:"accessControl"},{header:l(()=>[R("span",null,d(t(n).accessControl),1),p(t(M))]),tooltip:l(()=>[g(d(t(n).tooltip),1)]),default:l(()=>[p(t(L),null,{default:l(()=>[(u(!0),C(w,null,U(h.value,E=>(u(),y(t(N),{key:E.name,name:E.label},{content:l(()=>[R("div",T,[p(O,{disabled:!0,modelValue:!0},{default:l(()=>[g(d(t(n).useDefaultSettings),1)]),_:1})])]),_:2},1032,["name"]))),128))]),_:1}),p(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(d(t(n).ctaHeader),1)]),description:l(()=>[g(d(t(n).tooltip),1)]),_:1},8,["feature-list","cta-link","button-text","learn-more-link"])]),_:1})])}}},W={setup(){return{licenseStore:B()}},components:{AccessControl:b,AccessControlLite:b}},j={class:"aioseo-access-control"};function H(_,o,f,a,i,n){const h=S("access-control",!0),c=S("access-control-lite");return u(),C("div",j,[a.licenseStore.isUnlicensed?$("",!0):(u(),y(h,{key:0})),a.licenseStore.isUnlicensed?(u(),y(c,{key:1})):$("",!0)])}const ie=V(W,[["render",H]]);export{ie as default};
