import{r as l,x as O,y as R,o as M,k as r,z as F}from "./index-y8OWP3zI.js";import{t as W,P as w,I as $}from "./AuthorityCheck-ILqP0giz.js";import{T as y}from "./Text-RDjPAdg3.js";function U(n, e){return Array.isArray(n)?[...n].reduce((t, a)=>({...t,...U(a,e)}),{}):typeof n=="function"?n(e):n??{}}function B(){if(console&&console.warn){for(var n=arguments.length,e=new Array(n),t=0; t<n; t++)e[t]=arguments[t];typeof e[0]=="string"&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e)}}const _={};function C(){for(var n=arguments.length,e=new Array(n),t=0; t<n; t++)e[t]=arguments[t];typeof e[0]=="string"&&_[e[0]]||(typeof e[0]=="string"&&(_[e[0]]=new Date),B(...e))}const A=(n, e)=>()=>{if(n.isInitialized)e();else{const t=()=>{setTimeout(()=>{n.off("initialized",t)},0),e()};n.on("initialized",t)}};function T(n, e, t){n.loadNamespaces(e,A(n,t))}function k(n, e, t, a){typeof t=="string"&&(t=[t]),t.forEach(i=>{n.options.ns.indexOf(i)<0&&n.options.ns.push(i)}),n.loadLanguages(e,A(n,a))}function J(n, e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const a=e.languages[0],i=e.options?e.options.fallbackLng:!1,s=e.languages[e.languages.length-1];if(a.toLowerCase()==="cimode")return!0;const d=(v, h)=>{const o=e.services.backendConnector.state[`${v}|${h}`];return o===-1||o===2};return t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!d(e.isLanguageChangingTo,n)?!1:!!(e.hasResourceBundle(a,n)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||d(a,n)&&(!i||d(s,n)))}function G(n, e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!e.languages||!e.languages.length?(C("i18n.languages were undefined or empty",e.languages),!0):e.options.ignoreJSONStructure!==void 0?e.hasLoadedNamespace(n,{lng:t.lng,precheck:(i, s)=>{if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!s(i.isLanguageChangingTo,n))return!1}}):J(n,e,t)}const H=l.createContext();class Y{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const q=(n, e)=>{const t=l.useRef();return l.useEffect(()=>{t.current=e?t.current:n},[n,e]),t.current};function E(n, e, t, a){return n.getFixedT(e,t,a)}function K(n, e, t, a){return l.useCallback(E(n,e,t,a),[n,e,t,a])}function le(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:t}=e,{i18n:a,defaultNS:i}=l.useContext(H)||{},s=t||a||R();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new Y),!s){C("You will need to pass in an i18next instance by using initReactI18next");const c=(g, u)=>typeof u=="string"?u:u&&typeof u=="object"&&typeof u.defaultValue=="string"?u.defaultValue:Array.isArray(g)?g[g.length-1]:g,f=[c,{},!1];return f.t=c,f.i18n={},f.ready=!1,f}s.options.react&&s.options.react.wait!==void 0&&C("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const d={...O(),...s.options.react,...e},{useSuspense:v,keyPrefix:h}=d;let o=n||i||s.options&&s.options.defaultNS;o=typeof o=="string"?[o]:o||["translation"],s.reportNamespaces.addUsedNamespaces&&s.reportNamespaces.addUsedNamespaces(o);const p=(s.isInitialized||s.initializedStoreOnce)&&o.every(c=>G(c,s,d)),P=K(s,e.lng||null,d.nsMode==="fallback"?o:o[0],h),I=()=>P,j=()=>E(s,e.lng||null,d.nsMode==="fallback"?o:o[0],h),[z,x]=l.useState(I);let N=o.join();e.lng&&(N=`${e.lng}${N}`);const S=q(N),m=l.useRef(!0);l.useEffect(()=>{const{bindI18n:c,bindI18nStore:f}=d;m.current=!0,!p&&!v&&(e.lng?k(s,e.lng,o,()=>{m.current&&x(j)}):T(s,o,()=>{m.current&&x(j)})),p&&S&&S!==N&&m.current&&x(j);function g(){m.current&&x(j)}return c&&s&&s.on(c,g),f&&s&&s.store.on(f,g),()=>{m.current=!1,c&&s&&c.split(" ").forEach(u=>s.off(u,g)),f&&s&&f.split(" ").forEach(u=>s.store.off(u,g))}},[s,N]),l.useEffect(()=>{m.current&&p&&x(I)},[s,h,p]);const b=[z,s,p];if(b.t=z,b.i18n=s,b.ready=p,p||!p&&!v)return b;throw new Promise(c=>{e.lng?k(s,e.lng,o,()=>c()):T(s,o,()=>c())})}const Q="_navbar_eu2zr_1",X="_logo_eu2zr_9",Z="_navbarMain_eu2zr_12",D="_header_eu2zr_17",V="_footer_eu2zr_25",ee="_icon_eu2zr_32",ne="_link_eu2zr_36",te="_linkIcon_eu2zr_52",L={navbar:Q,logo:X,navbarMain:Z,header:D,footer:V,icon:ee,link:ne,linkIcon:te},se="_contentWrapper_1iu7d_1",re={contentWrapper:se};function oe(){const{fullName:n,email:e}=M(i=>i.auth.user),t=n.split(" ")[0][0],a=n.split(" ")[1][0];return r.jsx(r.Fragment,{children:r.jsxs("div",{className:re.contentWrapper,children:[r.jsx(W,{color:"blue",radius:"lg",children:t+a}),r.jsxs("div",{children:[r.jsx(y,{style:{fontWeight:"bold"},size:"md",children:n}),r.jsx(y,{size:"xs",children:e})]})]})})}function ae(){const[n,e]=l.useState(!1);return r.jsx("div",{children:r.jsxs(w,{width:200,position:"right",opened:n,offset:{mainAxis:13,crossAxis:0},children:[r.jsx(w.Target,{children:r.jsx("div",{onClick:()=>e(t=>!t),children:r.jsx(oe,{})})}),r.jsx(w.Dropdown,{children:r.jsx(y,{size:"xs",children:"Change position and offset to configure dropdown offset relative to target"})})]})})}function de(){const{signOut:n}=F();return r.jsxs(r.Fragment,{children:[r.jsx(ae,{}),r.jsxs("div",{className:L.link,onClick: e=>{n()},children:[r.jsx($,{className:L.icon}),r.jsx("span",{children:"Exit"})]})]})}export{de as S,L as c,U as g,le as u};
