theme.keycloak.v2.admin.resources.assets.ConfirmDialog-B5qjiAuo.js Maven / Gradle / Ivy
import{jsxs as D,jsx as c}from"react/jsx-runtime";import{useState as M}from"react";import{a as k,M as x,h as d,B as m,q as B}from"./index-C1LIsRX7.js";const V=n=>{const[a,t]=M(!1);function o(){t(r=>!r)}return[o,()=>c(j,{...n,open:a,toggleDialog:o},"confirmDialog")]},j=({titleKey:n,messageKey:a,noCancelButton:t,cancelButtonLabel:o,continueButtonLabel:l,continueButtonVariant:r,onConfirm:f,onCancel:e,children:u,open:p=!0,variant:h=B.small,toggleDialog:s,confirmButtonDisabled:C})=>{const{t:i}=k();return D(x,{title:i(n),isOpen:p,onClose:s,variant:h,actions:[c(d,{id:"modal-confirm","data-testid":"confirm",isDisabled:C,variant:r||m.primary,onClick:()=>{f(),s()},children:i(l||"continue")},"confirm"),!t&&c(d,{id:"modal-cancel","data-testid":"cancel",variant:m.link,onClick:()=>{e&&e(),s()},children:i(o||"cancel")},"cancel")],children:[!a&&u,a&&i(a)]})};export{j as C,V as u};
//# sourceMappingURL=ConfirmDialog-B5qjiAuo.js.map
© 2015 - 2025 Weber Informatics LLC | Privacy Policy