"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5842],{3294:(e,r,t)=>{t.d(r,{cn:()=>s});var a=t(52596),l=t(39688);function s(){for(var e=arguments.length,r=Array(e),t=0;t{t.d(r,{In:()=>a.I});var a=t(20550);t(55550)},20550:(e,r,t)=>{t.d(r,{A:()=>d,I:()=>n});var a=t(95155);t(12115);var l=t(24717),s=t(55550);let n=e=>{let{name:r,size:t="md",color:n="primary",className:d="",onClick:i}=e,o=l[r]||s[r];return o?(0,a.jsx)(o,{className:"".concat({xs:"h-3 w-3",sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-8 w-8"}[t]," ").concat({primary:"text-primary",secondary:"text-secondary",success:"text-success",danger:"text-danger",warning:"text-warning",info:"text-info",light:"text-text-secondary",dark:"text-text-primary",white:"text-white"}[n]," ").concat(d),onClick:i,"aria-hidden":"true"}):(console.warn('Icon "'.concat(r,'" not found')),null)},d=n},34965:(e,r,t)=>{t.d(r,{g:()=>n});var a=t(95155),l=t(66766);let s={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10",xl:"h-12 w-12"},n=e=>{let{src:r="/logos/logo.png",alt:t="Logo",size:n="md",className:d="",glossyBorder:i=!0}=e;return(0,a.jsxs)("div",{className:"relative overflow-hidden rounded-full ".concat(s[n]," ").concat(i?"border-2 border-gray-200/20 shadow-lg bg-gradient-to-b from-gray-600/50 to-gray-800/50 dark:border-gray-700/50 dark:from-gray-700/50 dark:to-gray-900/50":"bg-gray-700 dark:bg-gray-800"," ").concat(d),children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-0 z-10 bg-gradient-to-b from-white/10 to-transparent dark:from-gray-900/10"}),(0,a.jsx)(l.default,{src:r,alt:t,fill:!0,className:"object-cover",priority:!0})]})}},55550:(e,r,t)=>{t.r(r),t.d(r,{Award:()=>i,Certificate:()=>l,Diploma:()=>s,Signature:()=>n,Template:()=>d});var a=t(95155);t(12115);let l=e=>(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,a.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),(0,a.jsx)("line",{x1:"9",y1:"9",x2:"15",y2:"9"}),(0,a.jsx)("line",{x1:"9",y1:"12",x2:"15",y2:"12"}),(0,a.jsx)("line",{x1:"9",y1:"15",x2:"13",y2:"15"}),(0,a.jsx)("rect",{x:"17",y:"17",width:"4",height:"4",rx:"1",ry:"1",transform:"translate(2 36) rotate(-90)"})]}),s=e=>(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,a.jsx)("path",{d:"M12 15l-2-6 2-6 2 6-2 6z"}),(0,a.jsx)("path",{d:"M5 21v-7.5a4 4 0 0 1 4-4h6a4 4 0 0 1 4 4V21"}),(0,a.jsx)("path",{d:"M9 21h6"})]}),n=e=>(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,a.jsx)("path",{d:"M3 15c1.63-1.33 3.5-2 5.5-2 3.5 0 5.5 2 9 2 1.5 0 3-.67 4-2"}),(0,a.jsx)("path",{d:"M3 9c1.63-1.33 3.5-2 5.5-2 3.5 0 5.5 2 9 2 1.5 0 3-.67 4-2"})]}),d=e=>(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,a.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),(0,a.jsx)("rect",{x:"7",y:"7",width:"3",height:"9"}),(0,a.jsx)("rect",{x:"14",y:"7",width:"3",height:"5"}),(0,a.jsx)("rect",{x:"7",y:"17",width:"10",height:"2"})]}),i=e=>(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,a.jsx)("circle",{cx:"12",cy:"8",r:"6"}),(0,a.jsx)("path",{d:"M15.477 12.89L17 22l-5-3-5 3 1.523-9.11"})]})},65269:(e,r,t)=>{t.d(r,{Jp:()=>u});var a=t(95155),l=t(3294),s=t(12115),n=t(5935),d=t(34965);let i=e=>{let{logo:r=(0,a.jsx)(d.g,{size:"md"}),title:t,collapsible:l=!1,isCollapsed:s=!1,onToggleCollapse:i,children:o}=e;return(0,a.jsxs)("div",{className:"flex-shrink-0 border-b border-gray-200 dark:border-gray-700 p-1.5 gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between p-2",children:[(0,a.jsx)("div",{className:"flex items-center",children:s?(0,a.jsx)("div",{className:"flex justify-center w-full",children:"function"==typeof r?r({size:"sm"}):r}):(0,a.jsxs)(a.Fragment,{children:[r,t&&(0,a.jsx)("span",{className:"ml-3 text-lg font-semibold text-gray-800 dark:text-gray-100",children:t})]})}),l&&i&&(0,a.jsx)("button",{onClick:i,className:"rounded-lg p-1 text-gray-500 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-700",children:(0,a.jsx)(n.In,{name:s?"HiChevronRight":"HiChevronLeft",size:"sm"})})]}),!s&&o]})};i.displayName="SidenavHeader";var o=t(6874),c=t.n(o),x=t(35695);let g=e=>{let{items:r,isCollapsed:t=!1,onItemClick:d,children:i}=e,o=(0,x.usePathname)(),g=e=>!!o&&(o===e||o.startsWith("".concat(e,"/"))),m=e=>e?(0,a.jsx)("span",{className:(0,l.cn)("ml-auto rounded-full px-2 py-0.5 text-xs font-medium",{blue:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400",green:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400",red:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400",yellow:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400",purple:"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-400",gray:"bg-gray-100 text-gray-800 dark:bg-gray-700/30 dark:text-gray-400"}[e.color]),children:e.text}):null,h=e=>{if(!e.id||!e.label||!e.icon)return null;let i=g(e.href),o=e.isGroup,x=r.some(r=>r.parentId===e.id);if(o)return(0,a.jsxs)("li",{className:"pt-4 first:pt-0",children:[(0,a.jsx)("div",{className:"mb-1 px-2 text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400",children:e.label}),x&&(0,a.jsx)("ul",{className:"space-y-1",children:r.filter(r=>r.parentId===e.id).map(e=>h(e))})]},e.id);let u=()=>{d&&d(e)};return t&&!e.parentId?(0,a.jsx)("li",{className:"mb-1",title:e.label,children:(0,a.jsx)(c(),{href:e.href,className:(0,l.cn)("flex h-9 w-9 items-center justify-center rounded-lg p-2",{"bg-primary-50 text-primary-600 dark:bg-primary-900/30 dark:text-primary-300":i,"text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-700/50":!i}),target:e.target,onClick:u,children:"string"==typeof e.icon?(0,a.jsx)(n.In,{name:e.icon,size:"sm"}):s.createElement(e.icon,{className:"h-5 w-5"})})},e.id):(0,a.jsx)("li",{className:"mb-1",children:(0,a.jsxs)(c(),{href:e.href,className:(0,l.cn)("flex items-center rounded-lg p-2 text-base font-normal",{"bg-primary-50 text-primary-600 dark:bg-primary-900/30 dark:text-primary-300":i,"text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-700/50":!i}),target:e.target,onClick:u,children:[(0,a.jsx)("span",{className:"mr-3",children:"string"==typeof e.icon?(0,a.jsx)(n.In,{name:e.icon,size:"sm"}):s.createElement(e.icon,{className:"h-5 w-5"})}),!t&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"flex-1 truncate",children:e.label}),m(e.badge)]})]})},e.id)};return(0,a.jsxs)("div",{className:"flex-1 overflow-y-auto px-3 py-4",children:[i,(0,a.jsx)("ul",{className:"space-y-1",children:r.filter(e=>!e.parentId||e.isGroup).map(h)})]})};g.displayName="SidenavBody";let m=e=>{let{children:r}=e;return(0,a.jsx)("div",{className:"flex-shrink-0 border-t border-gray-200 dark:border-gray-700 p-1.5",children:r})};m.displayName="SidenavFooter";let h=e=>{let{children:r,collapsible:t=!1,defaultCollapsed:n=!1,className:d=""}=e,[i,o]=(0,s.useState)(n),c=()=>{t&&o(!i)};return(0,a.jsx)("aside",{className:(0,l.cn)("flex h-screen flex-col border-r border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-800 transition-width duration-200",d,{"w-16":i,"w-64":!i}),children:r&&s.Children.map(r,e=>s.isValidElement(e)&&e.type.displayName&&["SidenavHeader","SidenavBody","SidenavFooter"].includes(e.type.displayName)?s.cloneElement(e,{isCollapsed:i,collapsible:t,onToggleCollapse:c}):e)})};h.Header=i,h.Body=g,h.Footer=m;let u=h},85190:(e,r,t)=>{t.d(r,{X:()=>x});var a=t(95155),l=t(12115),s=t(12108),n=t(35695),d=t(6874),i=t.n(d),o=t(10351),c=t(24717);function x(){var e,r,t;let{userName:d,userEmail:x,userRole:g,userAvatar:m,position:h="bottom",navItems:u=[],onSignOut:y,showModeSwitch:p=!1,modeSwitchLabel:b="Switch Mode",onSwitchMode:f}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{data:w}=(0,s.useSession)();(0,n.useRouter)();let[k,v]=(0,l.useState)(!1),j=(0,l.useRef)(null);(0,l.useEffect)(()=>{function e(e){j.current&&!j.current.contains(e.target)&&v(!1)}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]);let N=async()=>{console.log("UserDropdown handleSignOut called",{hasCustomHandler:!!y}),y?y():(console.log("Using default signOut"),await (0,s.signOut)({redirect:!1}))},C=d||(null==w||null==(e=w.user)?void 0:e.name)||"User",L=x||(null==w||null==(r=w.user)?void 0:r.email)||"",S="User";if(g)S=Array.isArray(g)?g.join(", "):g;else if(null==w||null==(t=w.user)?void 0:t.roles){let e=w.user.roles||[];S=e.length>0?e.join(", "):"User"}let I=(null==C?void 0:C.charAt(0))||"U";return(0,a.jsxs)("div",{className:"relative",ref:j,children:[(0,a.jsxs)("button",{onClick:()=>v(!k),className:"flex w-full items-center rounded-lg p-2 transition-colors hover:bg-gray-100 dark:hover:bg-gray-700",children:[m?(0,a.jsx)("img",{src:m,alt:C,className:"h-8 w-8 rounded-full object-cover"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full bg-primary-100 text-primary-600 dark:bg-gray-700 dark:text-gray-200",children:I}),(0,a.jsxs)("div",{className:"ml-3 flex-1 text-left",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:C}),(0,a.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:S})]}),(0,a.jsx)("svg",{className:"ml-2 h-5 w-5 transform text-gray-400 transition-transform duration-200 ".concat(k?"rotate-180":""),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})})]}),k&&(0,a.jsx)("div",{className:"absolute ".concat((()=>{switch(h){case"top":return"bottom-full left-0 mb-1";case"right":return"top-0 left-full ml-1";case"left":return"top-0 right-full mr-1";default:return"top-full left-0 mt-1"}})()," min-w-[200px] w-full rounded-lg border border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-800 z-50"),children:(0,a.jsxs)("div",{className:"p-2",children:[L&&(0,a.jsxs)("div",{className:"mb-2 border-b border-gray-200 pb-2 dark:border-gray-700",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:C}),(0,a.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:L})]}),p&&f&&(0,a.jsxs)("button",{onClick:()=>{f(),v(!1)},className:"flex w-full items-center rounded-md px-3 py-2 text-sm text-blue-600 hover:bg-blue-50 dark:text-blue-400 dark:hover:bg-blue-900/30 mb-1",children:[(0,a.jsx)("span",{className:"mr-2",children:(0,a.jsx)(c.HiOutlineSwitchHorizontal,{className:"h-4 w-4"})}),b]}),u.map((e,r)=>(0,a.jsx)("div",{children:e.href?(0,a.jsxs)(i(),{href:e.href,className:"flex items-center rounded-md px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-700",onClick:()=>{var r;v(!1),null==(r=e.onClick)||r.call(e)},children:[e.icon&&(0,a.jsx)("span",{className:"mr-2",children:e.icon}),e.label]}):(0,a.jsxs)("button",{onClick:()=>{var r;v(!1),null==(r=e.onClick)||r.call(e)},className:"flex w-full items-center rounded-md px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-700",children:[e.icon&&(0,a.jsx)("span",{className:"mr-2",children:e.icon}),e.label]})},r)),0===u.length&&!1,(0,a.jsxs)("button",{onClick:e=>{console.log("Sign out button clicked"),e.preventDefault(),e.stopPropagation(),v(!1),N()},className:"flex w-full items-center rounded-md px-3 py-2 text-sm text-red-600 hover:bg-red-50 dark:text-red-400 dark:hover:bg-red-900/30 mt-1",children:[(0,a.jsx)(o.QeK,{className:"mr-2 h-4 w-4"}),"Sign Out"]})]})})]})}}}]);