"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[49810],{649810(e,t,n){n.r(t),n.d(t,{default:()=>E});var i=n(296540),a=n(217439),r=n(71479),l=n(469733),s=n(372737),o=n(126457),c=n(916537),u=n(705426);const m=(0,r.A)("div")`
  line-height: 1.5;
  word-break: break-word;
`,d=(0,r.A)(a.A)`
  color: ${({theme:{motifPalette:{text01:e}}})=>e} !important;
  padding-right: ${({theme:{spacing:e}})=>e["spacing-xl"]};
`,E=({message:e,title:t,onConfirm:n,children:r=null,messageValues:E={},size:k="small",titleValues:C={},onCancel:p=null,confirmButtonProps:A={},confirmButtonText:f,...w})=>{const h=(0,l.useDispatch)(),g=(0,i.useCallback)(()=>{p?p():h((0,o.AS)())},[p,h]);return(0,i.useEffect)(()=>{function e(e){e.stopPropagation(),e.key===s.U.ENTER?n():e.key===s.U.ESCAPE&&g()}return window.addEventListener("keydown",e,!0),()=>{window.removeEventListener("keydown",e,!0)}},[g,n]),i.createElement(u.A,{actions:[{text:i.createElement(c.sA,{id:"COMMON_ACTION_CANCEL"}),type:"button",onClick:g},{text:i.createElement(c.sA,{id:f??"COMMON_ACTION_CONFIRM"}),type:"button",variant:"primary",onClick:()=>n(),...A}],size:k,title:i.createElement(d,{size:"large",isTruncated:!0},i.createElement(c.sA,{id:t,values:C})),...w},i.createElement(m,null,i.createElement(a.A,{size:"medium"},i.createElement(c.sA,{id:e,values:E}))),r)}}}]);