"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[6293,9810],{906293:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var a=n(296540),i=n(469733),l=n(314714),s=n(459449),r=n(126457),o=n(649810);const c=({onConfirm:e,name:t,withRemoveGlobalPermissions:n,...c})=>{const u=(0,i.useDispatch)(),[m,E]=(0,a.useState)(!1),d=(0,a.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),E(!m)},[m]),C=(0,a.useCallback)(()=>{e(m),u((0,r.AS)())},[e,m,u]);return a.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?a.createElement(l.A,{checked:m,id:"adminRemove",onChange:d},a.createElement(s.sA,{id:"COMMON_ADMIN_REMOVE_GLOBAL_PERMISSIONS"})):null)}},649810:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var a=n(296540),i=n(469733),l=n(927099),s=n(71479),r=n(459449),o=n(126457),c=n(372737),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,i.useDispatch)(),N=(0,a.useCallback)(()=>{A?A():f((0,o.AS)())},[A,f]);return(0,a.useEffect)(()=>{function e(e){e.stopPropagation(),e.key===c.U.ENTER?n():e.key===c.U.ESCAPE&&N()}return window.addEventListener("keydown",e,!0),()=>{window.removeEventListener("keydown",e,!0)}},[N,n]),a.createElement(u.A,{actions:[{text:a.createElement(r.sA,{id:"COMMON_ACTION_CANCEL"}),type:"button",onClick:N},{text:a.createElement(r.sA,{id:p??"COMMON_ACTION_CONFIRM"}),type:"button",variant:"primary",onClick:()=>n(),...k}],size:C,title:a.createElement(E,{size:"header-xs",truncate:!0},a.createElement(r.sA,{id:t,values:O})),..._},a.createElement(m,null,a.createElement(l.A,{size:"body"},a.createElement(r.sA,{id:e,values:d}))),s)}}}]);