import{j as e}from"./vendor-mui-69397583.js";import{L as x}from"./Logo-3f3c9ee6.js";import{h as m,d as o,k as p}from"./index-c62ac197.js";import{M as u,D as a}from"./index-c2088808.js";import{L as j}from"./vendor-react-ece1c85f.js";import{u as M}from"./vendor-i18n-2fcb1983.js";const H=()=>{const t=m(n=>n.theme.mode),i=m(n=>n.theme.navMode)==="dark"?"dark":t;return e.jsx(x,{mode:i,logoWidth:"150px",className:"hidden md:block"})},h=({path:t,children:r,isExternalLink:i,className:n})=>e.jsx(j,{className:o("h-full w-full flex items-center",n),to:t,target:i?"_blank":"",children:e.jsx("span",{children:r})}),c=({nav:t,isLink:r,manuVariant:i})=>{const{menuName:n,routeLink:s,isExternalLink:l}=t;return e.jsx(e.Fragment,{children:s&&r?e.jsx(h,{path:s,isExternalLink:l,children:e.jsx(u,{variant:"light",children:e.jsx("span",{children:n})})}):e.jsxs(u,{variant:"light",children:[e.jsx("span",{children:n}),e.jsx(p,{className:"ml-0.5 text-xs opacity-50"})]})})},d=({nav:t})=>{const{menuName:r,translateKey:i,routeLink:n,$id:s,isExternalLink:l}=t;return e.jsx(a.Item,{eventKey:s,className:o(n&&"px-0"),children:n?e.jsx(h,{path:n,className:o(n&&"px-2"),isExternalLink:l,children:r}):e.jsx("span",{children:r})})},N=({manuVariant:t,userAuthority:r=[],menus:i=[]})=>(M(),e.jsx("span",{className:"flex items-center",children:i.map(n=>n.isView?n.childMenus.$values.length>0?e.jsx(a,{trigger:"hover",renderTitle:e.jsx(c,{manuVariant:t,nav:n},n.$id),children:n.childMenus.$values.map(s=>s.isView?e.jsx(e.Fragment,{children:s.childMenus.$values.length>0?e.jsx(a.Menu,{title:s.menuName,children:s.childMenus.$values.map(l=>l.isView?e.jsx(d,{nav:l}):null)}):e.jsx(d,{nav:s},s.$id)}):null)},n.$id):n.childMenus.$values.length===0?e.jsx(c,{isLink:!0,nav:n,manuVariant:t}):null:null)}));export{N as H,H as a};
