import{j as e}from"./vendor-mui-69397583.js";import{f as m,r as x}from"./vendor-react-ece1c85f.js";import{A as g}from"./AdaptableCard-df7695d6.js";import{h as l}from"./index-c62ac197.js";const u=i=>{const a=m(),t=l(d=>d.theme.mode),r=t==="dark"?"bg-orange-800":"bg-white",s="text-orange-500",n="text-orange-500",o="text-orange-500",c="bg-[#355a52] hover:bg-[#2d4c46]";return x.useEffect(()=>{a("/")},[]),e.jsx(g,{className:"h-screen flex items-center justify-center",children:e.jsxs("div",{className:`flex flex-col items-center text-center ${r} rounded-lg shadow-lg p-10 max-w-lg w-full`,children:[e.jsx("h1",{className:`text-9xl font-extrabold ${s} mb-4`,children:"403"}),e.jsx("h2",{className:`text-3xl font-semibold ${n} mb-4`,children:"Access Denied"}),e.jsx("p",{className:`${o} mb-6`,children:"You don’t have permission to view this page. Please contact your administrator if you believe this is an error."}),e.jsx("button",{onClick:()=>a("/"),className:`${c} text-white px-8 py-3 rounded-full font-medium transition duration-300`,children:"Go Back (Home Page)"})]})})},j=(i,a)=>t=>{var n;const r=l(o=>{var c;return((c=o.auth.session)==null?void 0:c.permission)||[]}),s=((n=r==null?void 0:r.filter(o=>(o==null?void 0:o.menuName)===a))==null?void 0:n[0])||{isView:!1};return s!=null&&s.isView?e.jsx(i,{...t}):e.jsx(u,{})};export{j as P};
