(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2445],{4489:function(e,n,r){Promise.resolve().then(r.bind(r,72719))},90246:function(e,n,r){"use strict";function l(e){let n=[e];return{all:n,lists:()=>[...n,"list"],list:e=>[...n,"list",{params:e}],details:()=>[...n,"detail"],detail:e=>[...n,"detail",e]}}r.d(n,{n:function(){return l}})},39760:function(e,n,r){"use strict";var l=r(2265),t=r(99376),s=r(14474),i=r(3914),a=r(19250);n.Z=()=>{var e,n,r,u,o,d;let c=(0,t.useRouter)(),m="undefined"!=typeof document?(0,i.e)("token"):null;(0,l.useEffect)(()=>{m||c.replace("".concat((0,a.getProxyBaseUrl)(),"/ui/login"))},[m,c]);let p=(0,l.useMemo)(()=>{if(!m)return null;try{return(0,s.o)(m)}catch(e){return(0,i.b)(),c.replace("".concat((0,a.getProxyBaseUrl)(),"/ui/login")),null}},[m,c]);return{token:m,accessToken:null!==(e=null==p?void 0:p.key)&&void 0!==e?e:null,userId:null!==(n=null==p?void 0:p.user_id)&&void 0!==n?n:null,userEmail:null!==(r=null==p?void 0:p.user_email)&&void 0!==r?r:null,userRole:function(e){if(!e)return"Undefined Role";switch(e.toLowerCase()){case"app_owner":case"demo_app_owner":return"App Owner";case"app_admin":case"proxy_admin":return"Admin";case"proxy_admin_viewer":return"Admin Viewer";case"org_admin":return"Org Admin";case"internal_user":return"Internal User";case"internal_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(u=null==p?void 0:p.user_role)&&void 0!==u?u:null),premiumUser:null!==(o=null==p?void 0:p.premium_user)&&void 0!==o?o:null,disabledPersonalKeyCreation:null!==(d=null==p?void 0:p.disabled_non_admin_personal_key_creation)&&void 0!==d?d:null,showSSOBanner:(null==p?void 0:p.login_method)==="username_password"}}},72719:function(e,n,r){"use strict";r.r(n);var l=r(57437),t=r(24504),s=r(39760);n.default=()=>{let{accessToken:e,userRole:n,userId:r,premiumUser:i}=(0,s.Z)();return(0,l.jsx)(t.Z,{accessToken:e,userRole:n,userID:r,premiumUser:i})}},21609:function(e,n,r){"use strict";r.d(n,{Z:function(){return d}});var l=r(57437),t=r(57840),s=r(22116),i=r(51653),a=r(76188),u=r(4260),o=r(2265);function d(e){let{isOpen:n,title:r,alertMessage:d,message:c,resourceInformationTitle:m,resourceInformation:p,onCancel:f,onOk:_,confirmLoading:x,requiredConfirmation:v}=e,{Title:h,Text:g}=t.default,[b,j]=(0,o.useState)("");return(0,o.useEffect)(()=>{n&&j("")},[n]),(0,l.jsx)(s.Z,{title:r,open:n,onOk:_,onCancel:f,confirmLoading:x,okText:x?"Deleting...":"Delete",cancelText:"Cancel",okButtonProps:{danger:!0,disabled:!!v&&b!==v||x},cancelButtonProps:{disabled:x},children:(0,l.jsxs)("div",{className:"space-y-4",children:[d&&(0,l.jsx)(i.Z,{message:d,type:"warning"}),(0,l.jsxs)("div",{className:"mt-4 p-4 bg-red-50 rounded-lg border border-red-200",children:[(0,l.jsx)(h,{level:5,className:"mb-3 text-gray-900",children:m}),(0,l.jsx)(a.Z,{column:1,size:"small",children:p&&p.map(e=>{let{label:n,value:r,...t}=e;return(0,l.jsx)(a.Z.Item,{label:(0,l.jsx)("span",{className:"font-semibold text-gray-700",children:n}),children:(0,l.jsx)(g,{...t,children:null!=r?r:"-"})},n)})})]}),(0,l.jsx)("div",{children:(0,l.jsx)(g,{children:c})}),v&&(0,l.jsxs)("div",{className:"mb-6 mt-4 pt-4 border-t border-gray-200",children:[(0,l.jsxs)(g,{className:"block text-base font-medium text-gray-700 mb-2",children:[(0,l.jsx)(g,{children:"Type "}),(0,l.jsx)(g,{strong:!0,type:"danger",children:v}),(0,l.jsx)(g,{children:" to confirm deletion:"})]}),(0,l.jsx)(u.default,{value:b,onChange:e=>j(e.target.value),placeholder:v,className:"rounded-md text-base border-gray-200",autoFocus:!0})]})]})})}}},function(e){e.O(0,[1047,9028,9409,4865,337,8135,1442,2926,2409,3367,353,1994,7138,5869,5333,525,6609,1713,4546,5945,8352,8049,4504,2971,2117,1744],function(){return e(e.s=4489)}),_N_E=e.O()}]);