"use strict";(globalThis.webpackChunk_clerk_ui=globalThis.webpackChunk_clerk_ui||[]).push([["505"],{17396:function(e,o,i){i.d(o,{n:()=>a});var t=i(61564);i(35074);var n=i(86705);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]})}},78195:function(e,o,i){i.d(o,{RevokeAPIKeyConfirmationModal:()=>h});var t=i(61564),n=i(90231),a=i(58920),r=i(23707),l=i(52454),s=i(11475),c=i(23549),d=i(10078),p=i(22861),u=i(8640),m=i(17396);let h=e=>{let{isOpen:o,onOpen:i,onClose:h,apiKeyID:k,apiKeyName:v,onRevokeSuccess:b,modalRoot:f}=e,y=(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 y.apiKeys.revoke({apiKeyID:k}),null==b||b(),g())};return o?(0,t.Y)(m.n,{handleOpen:i,handleClose:g,canCloseModal:!1,modalRoot:f,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}}}]);