"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[2812,9810],{892812:(e,t,n)=>{n.r(t),n.d(t,{default:()=>o});var s=n(296540),a=n(469733),i=n(999589),r=n(126457),l=n(649810);const o=({onConfirm:e,...t})=>{const n=(0,a.useDispatch)(),o=(0,s.useCallback)(()=>{e(),n((0,r.AS)())},[n,e]),c=(0,i.coerce)(String(t.messageValues?.toVersion))?.version;return s.createElement(l.default,{onConfirm:o,title:"COMMON_ACTIONS_UPGRADE_CONFIRM_TITLE",message:c?"COMMON_ACTIONS_UPGRADE_CONFIRM_VERSION_MESSAGE":"COMMON_ACTIONS_UPGRADE_CONFIRM_MESSAGE",...t,messageValues:{...t.messageValues,toVersion:c}})}},649810:(e,t,n)=>{n.r(t),n.d(t,{default:()=>E});var s=n(296540),a=n(469733),i=n(927099),r=n(71479),l=n(459449),o=n(126457),c=n(372737),u=n(705426);const m=(0,r.A)("div")`
  line-height: 1.5;
  word-break: break-word;
`,C=(0,r.A)(i.A)`
  color: ${({theme:{motifPalette:{text01:e}}})=>e} !important;
  padding-right: ${({theme:{spacing:e}})=>e["spacing-xl"]};
`,E=({message:e,title:t,onConfirm:n,children:r=null,messageValues:E={},size:d="small",titleValues:A={},onCancel:O=null,confirmButtonProps:N={},confirmButtonText:_,...f})=>{const k=(0,a.useDispatch)(),M=(0,s.useCallback)(()=>{O?O():k((0,o.AS)())},[O,k]);return(0,s.useEffect)(()=>{function e(e){e.stopPropagation(),e.key===c.U.ENTER?n():e.key===c.U.ESCAPE&&M()}return window.addEventListener("keydown",e,!0),()=>{window.removeEventListener("keydown",e,!0)}},[M,n]),s.createElement(u.A,{actions:[{text:s.createElement(l.sA,{id:"COMMON_ACTION_CANCEL"}),type:"button",onClick:M},{text:s.createElement(l.sA,{id:_??"COMMON_ACTION_CONFIRM"}),type:"button",variant:"primary",onClick:()=>n(),...N}],size:d,title:s.createElement(C,{size:"header-xs",truncate:!0},s.createElement(l.sA,{id:t,values:A})),...f},s.createElement(m,null,s.createElement(i.A,{size:"body"},s.createElement(l.sA,{id:e,values:E}))),r)}}}]);