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