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