"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[39187],{888980(_,e,t){t.r(e),t.d(e,{default:()=>M});var N=t(602086),i=t(237725),I=t(977872),E=t(409844),n=t(743178),a=t(159469),A=t(613842),s=t(890932),O=t(43506),o=t(974390),T=t(700444),C=t(470070),l=t(355108),d=t(976458),R=t(594633),r=t(570801),L=t(158402),u=t(754924),D=t(228502),S=t(369343),W=t(807811),m=t(969288);E.AH`
  width: auto !important;
  padding: 0 8px;
`;const c=E.AH`
  button {
    border-radius: 0;
    font-size: 12px;
  }
`,g="LTE_PAYMENT_EXPIRED",p="LTE_SUBSCRIPTION_CANCELLED",P="LTE_SUBSCRIPTION_CHECK",U="HAS_WLAN_OVERRIDES",f="HAS_NETWORKS_LIMIT_REACHED",h="HAS_MDNS_NETWORKS_LIMIT",M=()=>{const{formatMessage:_}=(0,C.tz)(),e=(0,I.wA)(),t=(0,i.W6)(),E=(0,I.d4)(r.GP),M=(0,I.d4)(r.Pk),G=(0,I.d4)(r.tg),k=(0,I.d4)(R.S$),y=(0,I.d4)(s.p),w=(0,I.d4)(d.ub),B=(0,I.d4)(u.hp),b=(0,I.d4)(u.$x),K=(0,I.d4)(D.A),x=(0,I.d4)(r.ay),H=(0,I.d4)(u.gj),Y=(0,I.d4)(S.xj),V=(0,I.d4)(S.EF),$=(0,I.d4)((0,N.useMemo)(()=>(0,S.wI)(M),[M])),v=(0,I.d4)(S.bx),j=(0,I.d4)(S.gj),X=(0,I.d4)(S.Ji),z=(0,n.Qh)(k),F=(0,O.A)(m._L),J=(0,O.A)(m.Cs);(0,N.useEffect)(()=>{E&&Y.length&&e((0,T.ox)({onClose:()=>e((0,T.uU)(g)),type:a.C.warning,title:_({id:"ON_LOAD_WARNING_PAYMENT_EXPIRED_TITLE"}),message:"ON_LOAD_WARNING_PAYMENT_EXPIRED_BODY",iconUrl:o.C.getRemoteImagePath(K[H]),stateIndicator:a.C.info,primaryButton:{label:_({id:"ON_LOAD_WARNING_PAYMENT_ACTION_UPDATE_PAYMENT"}),onClick:()=>A.A.open(`${W.DU}${z}/payments`)},className:c},g))},[z,e,_,H,E,Y.length,x,y,K]),(0,N.useEffect)(()=>{E&&V.length&&e((0,T.ox)({onClose:()=>e((0,T.uU)(p)),type:a.C.danger,title:_({id:"ON_LOAD_WARNING_SUBSCRIPTION_CANCELLED_TITLE"}),message:"ON_LOAD_WARNING_SUBSCRIPTION_CANCELLED_BODY",iconUrl:o.C.getRemoteImagePath(K[H]),stateIndicator:a.C.info,primaryButton:{label:_({id:"ON_LOAD_WARNING_PAYMENT_ACTION_UPDATE_PAYMENT"}),onClick:()=>A.A.open(`${W.DU}${z}/payments`)},className:c},p))},[z,e,_,E,x,H,V.length,y,K]);const Q=(0,N.useCallback)(()=>{e((0,T.uU)(P)),e((0,l.ZS)($,_))},[e,_,$]);return(0,N.useEffect)(()=>{E&&$.length&&e((0,T.ox)({duration:0,onClose:()=>e((0,T.uU)(P)),type:a.C.warning,title:_({id:"ON_LOAD_WARNING_VERIFY_ACCOUNT_TITLE"}),message:"LTE_ACTIONS_SUBSCRIPTION_CHECK_TOOLTIP",iconUrl:o.C.getRemoteImagePath(K[H]),stateIndicator:a.C.info,primaryButton:{label:_({id:"LTE_ACTIONS_SUBSCRIPTION_CHECK"}),onClick:Q},className:c},P))},[e,Q,_,H,E,$.length,y,K,x]),(0,N.useEffect)(()=>{E&&j&&!w&&!G.dismissWlanOverrides&&e((0,T.ox)({duration:0,type:a.C.warning,title:_({id:"ON_LOAD_WARNING_WLAN_OVERRIDES_TITLE"}),message:"ON_LOAD_WARNING_WLAN_OVERRIDES_DESCRIPTION",primaryButton:{label:_({id:"ON_LOAD_WARNING_WLAN_OVERRIDES_CTA"}),onClick:()=>{e((0,T.uU)(U)),e((0,L.i4)({dismissWlanOverrides:!0})).then(()=>t.push(F))}},onClose:()=>{e((0,L.i4)({dismissWlanOverrides:!0}))}},U))},[e,_,E,j,G,w,F,t]),(0,N.useEffect)(()=>{E&&v?.limit_reached&&!w&&e((0,T.ox)({duration:0,onClose:()=>e((0,T.uU)(f)),type:a.C.warning,title:_({id:"ON_LOAD_WARNING_NETWORKS_LIMIT_REACHED_TITLE"}),message:"ON_LOAD_WARNING_NETWORKS_LIMIT_REACHED_DESCRIPTION",values:{networksLimit:v.network_limit},primaryButton:{label:_({id:"ON_LOAD_WARNING_NETWORKS_LIMIT_REVIEW_NETWORKS"}),onClick:()=>{e((0,T.uU)(f)),t.push(J)}}},f))},[e,_,E,v,G,w,J,t]),(0,N.useEffect)(()=>{E&&X?.exceeded&&!w&&e((0,T.ox)({duration:0,type:a.C.warning,title:_({id:"ON_LOAD_WARNING_NETWORKS_LIMIT_REACHED_TITLE"}),details:_({id:"ON_LOAD_WARNING_MDNS_NETWORKS_LIMIT"},{gatewayName:B||b,limit:X?.limit}),primaryButton:{label:_({id:"ON_LOAD_WARNING_NETWORKS_LIMIT_REVIEW_NETWORKS"}),onClick:()=>{e((0,T.uU)(h)),t.push(J)}},onClose:()=>e((0,T.uU)(h))},h))},[E,X,B,w,_,t,J,e,b]),null}}}]);