import{b as r}from"./dc0o8kHW.js";function t(i){return r.isSuperAdmin?!0:r.access[i]===!0}function n(i){const s={config:"api.config.write",pages:"api.pages.write",users:"api.users.write",media:"api.media.write",gpm:"api.gpm.write",system:"api.system.write"}[i];return!(!t(s)||r.demoMode&&!r.demoWritable.includes(s))}function o(i,e){const s=e==="read"||e==="list",a=i?.permissions;return!a||typeof a[e]!="boolean"?s?t("api.pages.read"):n("pages"):a[e]&&!s&&r.demoMode&&!r.demoWritable.includes("api.pages.write")?!1:a[e]}export{t as a,n as c,o as p};
