import{N as y,j as r}from"./index-D0o5GN6H.js";import{A as c}from"./AccessDenied-CredP1nz.js";const d=({permission:e,module:i,action:l,role:a,requireAll:t=!1,children:f,fallback:n=null,hide:A=!1})=>{const{hasPermission:h,hasAnyPermission:m,hasAllPermissions:o,hasModulePermission:u,hasRole:P,hasAnyRole:x}=y();let s=!1;return i&&l?s=u(i,l):e?Array.isArray(e)?s=t?o(e):m(e):s=h(e):a?Array.isArray(a)?s=x(a):s=P(a):s=!1,s?r.jsx(r.Fragment,{children:f}):A?null:n?r.jsx(r.Fragment,{children:n}):r.jsx(c,{})};export{d as P};
