Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
import{r as h,u as C,j as t,B as m,l as d}from"./index-831988f6.js";import{M as D,a as M}from"./Modal-5d8a3df4.js";const w=i=>{const[o,s]=h.useState(!1);function a(){s(r=>!r)}return[a,()=>t.jsx(k,{...i,open:o,toggleDialog:a},"confirmDialog")]},k=({titleKey:i,messageKey:o,noCancelButton:s,cancelButtonLabel:a,continueButtonLabel:l,continueButtonVariant:r,onConfirm:u,onCancel:e,children:f,open:p=!0,variant:x=M.small,toggleDialog:c,confirmButtonDisabled:j})=>{const{t:n}=C();return t.jsxs(D,{title:n(i),isOpen:p,onClose:c,variant:x,actions:[t.jsx(m,{id:"modal-confirm","data-testid":"confirm",isDisabled:j,variant:r||d.primary,onClick:()=>{u(),c()},children:n(l||"common:continue")},"confirm"),!s&&t.jsx(m,{id:"modal-cancel","data-testid":"cancel",variant:d.link,onClick:()=>{e&&e(),c()},children:n(a||"common:cancel")},"cancel")],children:[!o&&f,o&&n(o)]})};export{k as C,w as u};
//# sourceMappingURL=ConfirmDialog-927d61dd.js.map