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