"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[67221],{267221(e,t,i){i.r(t),i.d(t,{default:()=>C});var n=i(274934),s=i(602086),r=i(938984),o=i(247816),l=i(977872),a=i(521376),d=i(869332),u=i(470070),c=i(384783);const k=(0,o.A)("div")`
  line-height: 1.5;
  word-break: break-word;
`,A=(0,o.A)(r.A)`
  color: ${({theme:{motifPalette:{text01:e}}})=>e} !important;
  padding-right: ${({theme:{spacing:e}})=>e["spacing-xl"]};
`,C=({message:e,title:t,onConfirm:i,children:o=null,messageValues:C={},size:m="small",titleValues:h={},onCancel:p=null,confirmButtonProps:w={},confirmButtonText:x,...f})=>{const g=(0,l.wA)(),N=(0,s.useCallback)(()=>{p?p():g((0,d.AS)())},[p,g]);return(0,s.useEffect)(()=>{function e(e){e.stopPropagation(),e.key===a.U.ENTER?i():e.key===a.U.ESCAPE&&N()}return window.addEventListener("keydown",e,!0),()=>{window.removeEventListener("keydown",e,!0)}},[N,i]),(0,n.jsxs)(c.A,{actions:[{text:(0,n.jsx)(u.sA,{id:"COMMON_ACTION_CANCEL"}),type:"button",onClick:N},{text:(0,n.jsx)(u.sA,{id:x??"COMMON_ACTION_CONFIRM"}),type:"button",variant:"primary",onClick:()=>i(),...w}],size:m,title:(0,n.jsx)(A,{size:"large",isTruncated:!0,children:(0,n.jsx)(u.sA,{id:t,values:h})}),...f,children:[(0,n.jsx)(k,{children:(0,n.jsx)(r.A,{size:"medium",children:(0,n.jsx)(u.sA,{id:e,values:C})})}),o]})}}}]);