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