"use strict";(globalThis.webpackChunk_clerk_ui=globalThis.webpackChunk_clerk_ui||[]).push([["505"],{17396:function(e,o,t){t.d(o,{n:()=>l});var i=t(14518);t(35074);var n=t(86705);let l=e=>{let{modalRoot:o,containerSx:t,...l}=e;return(0,i.Y)(n.Modal,{...l,portalRoot:o,containerSx:[[{alignItems:"center"},o?e=>({position:"absolute",right: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}):{}],t]})}},78195:function(e,o,t){t.d(o,{RevokeAPIKeyConfirmationModal:()=>m});var i=t(14518),n=t(54775),l=t(58920),a=t(23707),r=t(52454),s=t(11475),c=t(23549),d=t(10078),p=t(22861),u=t(8640),h=t(17396);let m=e=>{let{isOpen:o,onOpen:t,onClose:m,apiKeyID:k,apiKeyName:v,onRevokeSuccess:b,modalRoot:f}=e,y=(0,n.ho)(),{t:R}=(0,d._)(),C=(0,u.tJ)("apiKeyRevokeConfirmation","",{type:"text",label:'Type "Revoke" to confirm',placeholder:"Revoke",isRequired:!0}),g=C.value===R((0,p.G)("apiKeys.revokeConfirmation.confirmationText")),K=()=>{m(),C.setValue("")},$=async e=>{e.preventDefault(),k&&g&&(await y.apiKeys.revoke({apiKeyID:k}),null==b||b(),K())};return o?(0,i.Y)(h.n,{handleOpen:t,handleClose:K,canCloseModal:!1,modalRoot:f,children:(0,i.Y)(a.Z.Root,{role:"alertdialog",elementDescriptor:l.$z.apiKeysRevokeModal,children:(0,i.Y)(a.Z.Content,{sx:e=>({textAlign:"left",padding:"".concat(e.sizes.$4," ").concat(e.sizes.$5," ").concat(e.sizes.$4," ").concat(e.sizes.$6)}),children:(0,i.Y)(c.M,{headerTitle:(0,p.G)("apiKeys.revokeConfirmation.formTitle",{apiKeyName:v}),headerSubtitle:(0,p.G)("apiKeys.revokeConfirmation.formHint"),children:(0,i.FD)(r.l.Root,{onSubmit:$,children:[(0,i.Y)(r.l.ControlRow,{elementId:C.id,elementDescriptor:l.$z.apiKeysRevokeModalInput,children:(0,i.Y)(r.l.PlainInput,{...C.props})}),(0,i.Y)(s.G,{submitLabel:(0,p.G)("apiKeys.revokeConfirmation.formButtonPrimary__revoke"),colorScheme:"danger",isDisabled:!g,onReset:K,elementDescriptor:l.$z.apiKeysRevokeModalSubmitButton})]})})})})}):null}}}]);