"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[6813,67221],{267221(e,t,n){n.r(t),n.d(t,{default:()=>C});var i=n(274934),s=n(602086),a=n(938984),l=n(247816),o=n(977872),r=n(521376),u=n(869332),d=n(470070),c=n(384783);const m=(0,l.A)("div")`
  line-height: 1.5;
  word-break: break-word;
`,A=(0,l.A)(a.A)`
  color: ${({theme:{motifPalette:{text01:e}}})=>e} !important;
  padding-right: ${({theme:{spacing:e}})=>e["spacing-xl"]};
`,C=({message:e,title:t,onConfirm:n,children:l=null,messageValues:C={},size:O="small",titleValues:f={},onCancel:E=null,confirmButtonProps:h={},confirmButtonText:k,...N})=>{const p=(0,o.wA)(),w=(0,s.useCallback)(()=>{E?E():p((0,u.AS)())},[E,p]);return(0,s.useEffect)(()=>{function e(e){e.stopPropagation(),e.key===r.U.ENTER?n():e.key===r.U.ESCAPE&&w()}return window.addEventListener("keydown",e,!0),()=>{window.removeEventListener("keydown",e,!0)}},[w,n]),(0,i.jsxs)(c.A,{actions:[{text:(0,i.jsx)(d.sA,{id:"COMMON_ACTION_CANCEL"}),type:"button",onClick:w},{text:(0,i.jsx)(d.sA,{id:k??"COMMON_ACTION_CONFIRM"}),type:"button",variant:"primary",onClick:()=>n(),...h}],size:O,title:(0,i.jsx)(A,{size:"large",isTruncated:!0,children:(0,i.jsx)(d.sA,{id:t,values:f})}),...N,children:[(0,i.jsx)(m,{children:(0,i.jsx)(a.A,{size:"medium",children:(0,i.jsx)(d.sA,{id:e,values:C})})}),l]})}},906813(e,t,n){n.r(t),n.d(t,{default:()=>r});var i=n(274934),s=n(977872),a=n(869332),l=n(256468),o=n(267221);const r=({dontHideModalOnConfirm:e,name:t,onConfirm:n,message:r,plural:u,...d})=>{const c=(0,s.wA)();return(0,i.jsx)(o.default,{message:r||"COMMON_QUESTION_ARE_YOU_SURE_YOU_WANT_TO_REMOVE",messageValues:{name:t,count:u?l.Uh.PLURAL:l.Uh.SINGLE},title:"COMMON_QUESTION_REMOVE",titleValues:{name:t||null},onConfirm:()=>{n(),e||c((0,a.AS)())},...d})}}}]);