import{A as P,b as y,e as k,R as C,B as _,f as W,g as B,C as M,o as N,k as s,r as u,j as I,n as R,L as E,z as L}from "./index-y8OWP3zI.js";import{c as O,t as z,P as h,n as D,A as U,I as $}from "./AuthorityCheck-ILqP0giz.js";import{V as F}from "./Views-WvrQ7LwQ.js";import{T as j}from "./Text-RDjPAdg3.js";import{C as T}from "./Card-hmUBRbY3.js";var b={root:"m_4451eb3a"};const V={},m=P((e, n)=>{const t=y("Center",V,e),{classNames:r,className:o,style:i,styles:a,unstyled:c,vars:p,inline:x,mod:v,...g}=t,d=k({name:"Center",props:t,classes:b,className:o,style:i,classNames:r,styles:a,unstyled:c,vars:p});return C.createElement(_,{ref:n,mod:[{inline:x},v],...d("root"),...g})});m.classes=b;m.displayName="@mantine/core/Center";var S={root:"m_6d731127"};const H={gap:"md",align:"stretch",justify:"flex-start"},Y=B((e, {gap:n,align:t,justify:r})=>({root:{"--stack-gap":M(n),"--stack-align":t,"--stack-justify":r}})),f=W((e, n)=>{const t=y("Stack",H,e),{classNames:r,className:o,style:i,styles:a,unstyled:c,vars:p,align:x,justify:v,gap:g,variant:d,...w}=t,A=k({name:"Stack",props:t,classes:S,className:o,style:i,classNames:r,styles:a,unstyled:c,vars:p,varsResolver:Y});return C.createElement(_,{ref:n,...A("root"),variant:d,...w})});f.classes=S;f.displayName="@mantine/core/Stack";/**
 * @license @tabler/icons-react v3.1.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var q=O("outline","user-circle","IconUserCircle",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 10m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855",key:"svg-2"}]]);const G="_navbar_pfw5h_1",J="_navbarMain_pfw5h_9",K="_logo_pfw5h_15",Q="_linkWrapper_pfw5h_19",X="_link_pfw5h_19",l={navbar:G,navbarMain:J,logo:K,linkWrapper:Q,link:X},Z="_contentWrapper_hwmi3_1",ss={contentWrapper:Z};function es(){const{fullName:e,email:n}=N(o=>o.auth.user),t=e.split(" ")[0][0],r=e.split(" ")[1][0];return s.jsx(s.Fragment,{children:s.jsxs("div",{className:ss.contentWrapper,children:[s.jsx(z,{color:"blue",radius:"lg",children:t+r}),s.jsxs("div",{children:[s.jsx(j,{style:{fontWeight:"bold"},size:"md",children:e}),s.jsx(j,{size:"xs",children:n})]})]})})}function as(){const[e,n]=u.useState(!1);return s.jsx("div",{children:s.jsxs(h,{width:200,position:"right",opened:e,offset:{mainAxis:13,crossAxis:0},children:[s.jsx(h.Target,{children:s.jsx("div",{onClick:()=>n(t=>!t),children:s.jsx(q,{size:30,strokeWidth:1.5,color:"black"})})}),s.jsx(h.Dropdown,{children:s.jsx(es,{})})]})})}function ts(){const{signOut:e}=L();return s.jsxs("div",{className:l.linkWrapper,children:[s.jsx("div",{className:l.link,children:s.jsx(as,{})}),s.jsx("div",{className:l.link,onClick:()=>{e()},children:s.jsx($,{})})]})}function ns(){const[e,n]=u.useState(""),t=I(),r=R(),o=N(a=>a.auth.user.role);u.useEffect(()=>{const a=r.pathname.split("/")[1];n(a)},[r.pathname]);const i=D.map(a=>s.jsx(U,{userAuthority:o||[],authority:a.authority,children:s.jsx(E,{className:l.link,"data-active":a.path.split("/")[1]===e?"true":void 0,to:a.path,onClick:c=>{c.preventDefault(),t(a.path)},children:s.jsx(a.icon,{className:l.linkIcon,stroke:1.5})},a.title)}));return s.jsxs("nav",{className:l.navbar,children:[s.jsx(m,{children:s.jsx("img",{className:l.logo,alt:"Mantine Logo",src:"/logo/logo-light-full.svg"})}),s.jsx("div",{className:l.navbarMain,children:s.jsx(f,{justify:"center",gap:10,children:i})}),s.jsx(ts,{})]})}function ps(){return s.jsx(s.Fragment,{children:s.jsxs("div",{style:{display:"flex",flex:" 1 1 auto",backgroundColor:"rgb(241,240,240)"},children:[s.jsx(ns,{}),s.jsx("div",{style:{padding:"2rem",backgroundColor:"#ffffff",flex:1,overflow:"hidden",display:"flex",flexDirection:"column",height:"100vh"},children:s.jsx(T,{style:{overflowY:"auto",maxHeight:"100%",width:"100%",flex:1},radius:15,withBorder:!0,p:40,children:s.jsx(F,{})})})]})})}export{ps as default};
