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