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