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