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