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