"use strict";(globalThis.webpackChunk_clerk_ui=globalThis.webpackChunk_clerk_ui||[]).push([["505"],{16103(e,o,i){i.d(o,{n:()=>a});var t=i(59763);i(59701);var n=i(62574);let a=e=>{let{modalRoot:o,containerSx:i,...a}=e;return(0,t.Y)(n.Modal,{...a,portalRoot:o,containerSx:[[{alignItems:"center"},o?e=>({position:"absolute",insetInlineEnd:0,bottom:0,backgroundColor:"inherit",backdropFilter:"blur(".concat(e.sizes.$2,")"),display:"flex",justifyContent:"center",minHeight:"100%",height:"100%",width:"100%",borderRadius:e.radii.$lg}):{}],i]})}},23860(e,o,i){i.d(o,{RevokeAPIKeyConfirmationModal:()=>h});var t=i(59763),n=i(42959),a=i(26447),r=i(27904),l=i(17447),s=i(46600),c=i(5870),d=i(84722),p=i(78342),u=i(51637),m=i(16103);let h=e=>{let{isOpen:o,onOpen:i,onClose:h,apiKeyID:k,apiKeyName:v,onRevokeSuccess:b,modalRoot:y}=e,f=(0,n.ho)(),{t:C}=(0,d._)(),R=(0,u.tJ)("apiKeyRevokeConfirmation","",{type:"text",label:(0,p.G)("apiKeys.revokeConfirmation.inputLabel"),placeholder:(0,p.G)("apiKeys.revokeConfirmation.confirmationText"),isRequired:!0}),K=R.value===(C((0,p.G)("apiKeys.revokeConfirmation.confirmationText"))||"Revoke"),g=()=>{h(),R.setValue("")},$=async e=>{e.preventDefault(),k&&K&&(await f.apiKeys.revoke({apiKeyID:k}),null==b||b(),g())};return o?(0,t.Y)(m.n,{handleOpen:i,handleClose:g,canCloseModal:!1,modalRoot:y,children:(0,t.Y)(r.Z.Root,{role:"alertdialog",elementDescriptor:a.$z.apiKeysRevokeModal,children:(0,t.Y)(r.Z.Content,{sx:e=>({textAlign:"start",padding:"".concat(e.sizes.$4," ").concat(e.sizes.$5," ").concat(e.sizes.$4," ").concat(e.sizes.$6)}),children:(0,t.Y)(c.M,{headerTitle:(0,p.G)("apiKeys.revokeConfirmation.formTitle",{apiKeyName:v}),headerSubtitle:(0,p.G)("apiKeys.revokeConfirmation.formHint"),children:(0,t.FD)(l.l.Root,{onSubmit:$,children:[(0,t.Y)(l.l.ControlRow,{elementId:R.id,elementDescriptor:a.$z.apiKeysRevokeModalInput,children:(0,t.Y)(l.l.PlainInput,{...R.props})}),(0,t.Y)(s.G,{submitLabel:(0,p.G)("apiKeys.revokeConfirmation.formButtonPrimary__revoke"),colorScheme:"danger",isDisabled:!K,onReset:g,elementDescriptor:a.$z.apiKeysRevokeModalSubmitButton})]})})})})}):null}}}]);