/*! For license information please see 345.8d5f7c3d.chunk.js.LICENSE.txt */
"use strict";(self.webpackChunkbackend_ai_webui_react=self.webpackChunkbackend_ai_webui_react||[]).push([[345],{2726:(e,a,n)=>{n.r(a),n.d(a,{default:()=>f});var l,i=n(83468),s=n(16162),r=n(57857),t=n(25339),c=n(29871),o=n(6932),d=n(14862),u=n(24128),y=n(48713),m=(n(76998),n(77678)),k=n(3606),p=n(23446);const f=e=>{let{onRequestClose:a,...f}=e;const{t:g}=(0,m.Bd)(),[K]=(0,s.U6)(),b=(0,i.CX)(),{data:_}=(0,r.n)({queryKey:["baiClient.keypair.list",f.open],queryFn:()=>f.open?b.keypair.list(K.email,["access_key","secret_key","is_active"],!0).then((e=>e.keypairs)):null,suspense:!1,staleTime:0,cacheTime:0}),x=null===b||void 0===b?void 0:b.supports("main-access-key"),{user:h}=(0,k.useLazyLoadQuery)(void 0!==l?l:l=n(3421),{email:K.email});return(0,p.jsx)(t.A,{...f,title:g("usersettings.MyKeypairInfo"),centered:!0,onCancel:a,destroyOnClose:!0,width:"auto",footer:[(0,p.jsx)(o.Ay,{onClick:()=>{a()},children:g("button.Close")},"keypairInfoClose")],children:(0,p.jsx)(d.A,{scroll:{x:"max-content"},rowKey:"access_key",dataSource:_,columns:[{title:"#",fixed:"left",render:(e,a,n)=>++n,showSorterTooltip:!1,rowScope:"row"},{title:g("general.AccessKey"),key:"accessKey",dataIndex:"access_key",fixed:"left",render:e=>(0,p.jsxs)(c.A,{direction:"column",align:"start",children:[(0,p.jsx)(u.A.Text,{ellipsis:!0,copyable:!0,children:e}),x&&e===(null===h||void 0===h?void 0:h.main_access_key)&&(0,p.jsx)(y.A,{color:"#457b3b",children:g("credential.MainAccessKey")})]})},{title:g("general.SecretKey"),key:"secretKey",dataIndex:"secret_key",fixed:"left",render:e=>(0,p.jsx)(u.A.Text,{ellipsis:!0,copyable:!0,children:e})}]})})}},3421:(e,a,n)=>{n.r(a),n.d(a,{default:()=>i});const l=function(){var e=[{defaultValue:null,kind:"LocalArgument",name:"email"}],a=[{kind:"Variable",name:"email",variableName:"email"}],n={alias:null,args:null,kind:"ScalarField",name:"email",storageKey:null},l={alias:null,args:null,kind:"ScalarField",name:"main_access_key",storageKey:null};return{fragment:{argumentDefinitions:e,kind:"Fragment",metadata:null,name:"KeypairInfoModalQuery",selections:[{alias:null,args:a,concreteType:"User",kind:"LinkedField",name:"user",plural:!1,selections:[n,l],storageKey:null}],type:"Queries",abstractKey:null},kind:"Request",operation:{argumentDefinitions:e,kind:"Operation",name:"KeypairInfoModalQuery",selections:[{alias:null,args:a,concreteType:"User",kind:"LinkedField",name:"user",plural:!1,selections:[n,l,{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],storageKey:null}]},params:{cacheID:"352a943226b02e137a3fcd32fa0ae22a",id:null,metadata:{},name:"KeypairInfoModalQuery",operationKind:"query",text:'query KeypairInfoModalQuery(\n  $email: String\n) {\n  user(email: $email) {\n    email\n    main_access_key @since(version: "23.09.7")\n    id\n  }\n}\n'}}}();l.hash="70097c005c8abc07e233048a68db1273";const i=l}}]);
//# sourceMappingURL=345.8d5f7c3d.chunk.js.map