(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[599],{43073:function(e,s,l){Promise.resolve().then(l.bind(l,61926))},74990:function(e,s,l){"use strict";l.d(s,{z:function(){return n.Z}});var n=l(2179)},61926:function(e,s,l){"use strict";l.r(s),l.d(s,{default:function(){return v}});var n=l(3827),r=l(64090),t=l(47907),c=l(94347),i=l(37963),a=l(8792),o=l(2179),d=l(13810),h=l(10384),u=l(46453),x=l(61244),j=l(10827),m=l(3851),f=l(2044),Z=l(64167),g=l(74480),p=l(7178),N=l(8510),v=()=>{let[e,s]=(0,r.useState)(""),[l,v]=(0,r.useState)(null),[w,_]=(0,r.useState)(null),S=(0,t.useSearchParams)(),k=S.get("userID"),y=S.get("token"),[D,U]=(0,r.useState)("team"),[b,z]=(0,r.useState)(null);return(0,r.useEffect)(()=>{if(y){let e=(0,i.o)(y);if(e){if(console.log("Decoded token:",e),console.log("Decoded key:",e.key),z(e.key),e.user_role){let l=function(e){if(!e)return"Undefined Role";switch(console.log("Received user role: ".concat(e)),e.toLowerCase()){case"app_owner":case"demo_app_owner":return"App Owner";case"app_admin":return"Admin";case"app_user":return"App User";default:return"Unknown Role"}}(e.user_role);console.log("Decoded user_role:",l),s(l)}else console.log("User role not defined");e.user_email?v(e.user_email):console.log("User Email is not set ".concat(e))}}},[y]),(0,n.jsx)(r.Suspense,{fallback:(0,n.jsx)("div",{children:"Loading..."}),children:(0,n.jsxs)("div",{className:"flex flex-col min-h-screen",children:[(0,n.jsx)(c.Z,{userID:k,userRole:e,userEmail:l}),(0,n.jsx)("div",{className:"flex flex-1 overflow-auto",children:(0,n.jsxs)(u.Z,{numItems:1,className:"gap-0 p-10 h-[75vh] w-full",children:[(0,n.jsx)(h.Z,{numColSpan:1,children:(0,n.jsx)(d.Z,{className:"w-full mx-auto flex-auto overflow-y-auto max-h-[50vh]",children:(0,n.jsxs)(j.Z,{children:[(0,n.jsx)(Z.Z,{children:(0,n.jsxs)(p.Z,{children:[(0,n.jsx)(g.Z,{children:"Team Name"}),(0,n.jsx)(g.Z,{children:"Spend (USD)"}),(0,n.jsx)(g.Z,{children:"Budget (USD)"}),(0,n.jsx)(g.Z,{children:"TPM / RPM Limits"}),(0,n.jsx)(g.Z,{children:"Settings"})]})}),(0,n.jsxs)(m.Z,{children:[(0,n.jsxs)(p.Z,{children:[(0,n.jsx)(f.Z,{children:"Wilhelm Tell"}),(0,n.jsx)(f.Z,{className:"text-right",children:"1"}),(0,n.jsx)(f.Z,{children:"Uri, Schwyz, Unterwalden"}),(0,n.jsx)(f.Z,{children:"National Hero"}),(0,n.jsx)(f.Z,{children:(0,n.jsx)(x.Z,{icon:N.Z,size:"sm"})})]}),(0,n.jsxs)(p.Z,{children:[(0,n.jsx)(f.Z,{children:"The Witcher"}),(0,n.jsx)(f.Z,{className:"text-right",children:"129"}),(0,n.jsx)(f.Z,{children:"Kaedwen"}),(0,n.jsx)(f.Z,{children:"Legend"}),(0,n.jsx)(f.Z,{children:(0,n.jsx)(x.Z,{icon:N.Z,size:"sm"})})]}),(0,n.jsxs)(p.Z,{children:[(0,n.jsx)(f.Z,{children:"Mizutsune"}),(0,n.jsx)(f.Z,{className:"text-right",children:"82"}),(0,n.jsx)(f.Z,{children:"Japan"}),(0,n.jsx)(f.Z,{children:"N/A"}),(0,n.jsx)(f.Z,{children:(0,n.jsx)(x.Z,{icon:N.Z,size:"sm"})})]})]})]})})}),(0,n.jsx)(h.Z,{numColSpan:1,children:(0,n.jsx)(a.default,{href:"/team?userID=".concat(S.get("userID"),"&token=").concat(S.get("token")),children:(0,n.jsx)(o.Z,{className:"mx-auto",children:"+ Create New Team"})})})]})})]})})}},94347:function(e,s,l){"use strict";var n=l(3827),r=l(8792);l(64090);var t=l(74990);s.Z=e=>{let{userID:s,userRole:l,userEmail:c}=e;return console.log("User ID:",s),console.log("userEmail:",c),(0,n.jsxs)("nav",{className:"left-0 right-0 top-0 flex justify-between items-center h-12 mb-4",children:[(0,n.jsx)("div",{className:"text-left my-2 absolute top-0 left-0",children:(0,n.jsx)("div",{className:"flex flex-col items-center",children:(0,n.jsx)(r.default,{href:"/",children:(0,n.jsx)("button",{className:"text-gray-800 text-2xl py-1 rounded text-center",children:(0,n.jsx)("img",{src:"/get_image",width:200,height:200,alt:"LiteLLM Brand",className:"mr-2"})})})})}),(0,n.jsx)("div",{className:"text-right mx-4 my-2 absolute top-0 right-0",children:(0,n.jsxs)(t.z,{variant:"secondary",children:[c,(0,n.jsxs)("p",{children:["Role: ",l]}),(0,n.jsxs)("p",{children:["ID: ",s]})]})})]})}}},function(e){e.O(0,[276,971,69,744],function(){return e(e.s=43073)}),_N_E=e.O()}]);