"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[49810],{649810:(e,t,n)=>{n.r(t),n.d(t,{default:()=>E});var i=n(469733),a=n(296540),r=n(927099),l=n(71479),s=n(372737),o=n(126457),c=n(699784),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,i.useDispatch)(),N=(0,a.useCallback)(()=>{p?p():h((0,o.AS)())},[p,h]);return(0,a.useEffect)(()=>{function e(e){e.stopPropagation(),e.key===s.U.ENTER?n():e.key===s.U.ESCAPE&&N()}return window.addEventListener("keydown",e,!0),()=>{window.removeEventListener("keydown",e,!0)}},[N,n]),a.createElement(u.A,{actions:[{text:a.createElement(c.sA,{id:"COMMON_ACTION_CANCEL"}),type:"button",onClick:N},{text:a.createElement(c.sA,{id:f??"COMMON_ACTION_CONFIRM"}),type:"button",variant:"primary",onClick:()=>n(),...A}],size:k,title:a.createElement(m,{size:"header-xs",truncate:!0},a.createElement(c.sA,{id:t,values:C})),...w},a.createElement(d,null,a.createElement(r.A,{size:"body"},a.createElement(c.sA,{id:e,values:E}))),l)}}}]);