"use strict";(globalThis.webpackChunk_clerk_ui=globalThis.webpackChunk_clerk_ui||[]).push([["505"],{7396:function(e,o,i){i.d(o,{n:()=>l});var t=i(4518);i(630);var n=i(6705);let l=({modalRoot:e,containerSx:o,...i})=>(0,t.Y)(n.Modal,{...i,portalRoot:e,containerSx:[[{alignItems:"center"},e?e=>({position:"absolute",right:0,bottom:0,backgroundColor:"inherit",backdropFilter:`blur(${e.sizes.$2})`,display:"flex",justifyContent:"center",minHeight:"100%",height:"100%",width:"100%",borderRadius:e.radii.$lg}):{}],o]})},8195:function(e,o,i){i.d(o,{RevokeAPIKeyConfirmationModal:()=>m});var t=i(4518),n=i(8628),l=i(8920),r=i(6088),a=i(2454),s=i(1475),d=i(3549),p=i(78),c=i(2861),u=i(8640),h=i(7396);let m=({isOpen:e,onOpen:o,onClose:i,apiKeyID:m,apiKeyName:k,onRevokeSuccess:v,modalRoot:b})=>{let f=(0,n.ho)(),{t:y}=(0,p._)(),R=(0,u.tJ)("apiKeyRevokeConfirmation","",{type:"text",label:'Type "Revoke" to confirm',placeholder:"Revoke",isRequired:!0}),C=R.value===y((0,c.G)("apiKeys.revokeConfirmation.confirmationText")),$=()=>{i(),R.setValue("")},g=async e=>{e.preventDefault(),m&&C&&(await f.apiKeys.revoke({apiKeyID:m}),v?.(),$())};return e?(0,t.Y)(h.n,{handleOpen:o,handleClose:$,canCloseModal:!1,modalRoot:b,children:(0,t.Y)(r.Z.Root,{role:"alertdialog",elementDescriptor:l.$z.apiKeysRevokeModal,children:(0,t.Y)(r.Z.Content,{sx:e=>({textAlign:"left",padding:`${e.sizes.$4} ${e.sizes.$5} ${e.sizes.$4} ${e.sizes.$6}`}),children:(0,t.Y)(d.M,{headerTitle:(0,c.G)("apiKeys.revokeConfirmation.formTitle",{apiKeyName:k}),headerSubtitle:(0,c.G)("apiKeys.revokeConfirmation.formHint"),children:(0,t.FD)(a.l.Root,{onSubmit:g,children:[(0,t.Y)(a.l.ControlRow,{elementId:R.id,elementDescriptor:l.$z.apiKeysRevokeModalInput,children:(0,t.Y)(a.l.PlainInput,{...R.props})}),(0,t.Y)(s.G,{submitLabel:(0,c.G)("apiKeys.revokeConfirmation.formButtonPrimary__revoke"),colorScheme:"danger",isDisabled:!C,onReset:$,elementDescriptor:l.$z.apiKeysRevokeModalSubmitButton})]})})})})}):null}}}]);