"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[88032],{553432(e,t,a){a.d(t,{A:()=>s});var n=a(296540),l=a(454195),c=a(566723),o=a(294303);const s=e=>n.createElement(o.A,{paddingTop:c.YC,paddingBottom:c.YC,gap:c.Ln,rowGap:c.YC,flexWrap:"wrap",minHeight:l.b,alignItems:"center",...e})},688032(e,t,a){a.r(t),a.d(t,{default:()=>F});var n=a(296540),l=a(469733),c=a(54227),o=a(422969),s=a(464265),i=a(504779),r=a(553432),d=a(916537),p=a(649594),m=a(602021),S=a(598796),E=a(532419),_=a(419042),G=a(959341),u=a(472926),A=a(883245),I=a(547913),P=a(467802),T=a(992432),O=a(473714),N=a(921266);const f={[u.Z.BGP]:"SETTINGS_ROUTING_BGP_NAME",[u.Z.OSPF]:"SETTINGS_ROUTING_OSPF_NAME"},v={[u.Z.BGP]:T.default,[u.Z.OSPF]:A.default},R={[u.Z.BGP]:P.default.dependencies,[u.Z.OSPF]:I.default.dependencies},y=({type:e,typeSelector:t})=>{const a=n.createElement(v[e],{typeSelector:t,activeItem:{_id:G.R6}});return(0,o.A)(R[e]||[],a,{renderKey:e,placeholder:n.createElement(n.Fragment,{key:"fallback"},a),pastDelay:0})},B=({activeItem:e})=>{const t=(0,s.A)(S.Xj.OSPF_ROUTING),a=(0,s.A)(S.Xj.BGP_ROUTING),o=(0,s.A)(S.Xj.SWITCH_BGP_ROUTING),G=(0,l.useSelector)(p.Z0),u=(0,l.useSelector)(_._V),A=(0,l.useSelector)(m.vc),I=(0,l.useSelector)(E.n_),P=(0,n.useMemo)(()=>N.A.map(e=>({option:e,disabledReason:(0,O.x)(e,G,u,I,A,a,o,t)})),[I,u,a,t,o,G,A]),[T,v]=(0,n.useState)(e.type||P.filter(({disabledReason:e})=>!e)[0]?.option);return n.createElement(y,{type:T,typeSelector:n.createElement(r.A,null,P.map(({option:e,disabledReason:t})=>n.createElement(i.A,{key:e,reason:T!==e&&t},n.createElement(c.A,{value:e,id:e,checked:T===e,onChange:()=>v(e),disabled:!!t&&T!==e},n.createElement(d.sA,{id:f[e]}))))),key:T})},F=({activeItem:e})=>n.createElement(B,{key:e.type,activeItem:e})},921266(e,t,a){a.d(t,{A:()=>l});var n=a(472926);const l=[n.Z.OSPF,n.Z.BGP]},473714(e,t,a){a.d(t,{x:()=>i});var n=a(296540),l=a(916537),c=a(21508),o=a(860631),s=a(472926);const i=(e,t,a,i,r,d,p,m)=>e!==s.Z.OSPF||m?e!==s.Z.OSPF||i.some(e=>(0,c.Y)(e,m,r)&&!t.some(t=>(t.device_mac??r)===e.mac))?e!==s.Z.BGP||d||p?e!==s.Z.BGP||i.filter(e=>(0,o.Et)(e.switch_caps?.feature_caps)).map(({mac:e})=>e).concat(d&&r?[r]:[]).some(e=>!a.some(({device_mac:t})=>t===e))?null:n.createElement(l.sA,{id:"SETTINGS_ROUTING_BGP_ALREADY_CONFIGURED_DEVICES"}):n.createElement(l.sA,{id:"SETTINGS_BGP_NOT_SUPPORTED"}):n.createElement(l.sA,{id:"SETTINGS_ROUTING_OSPF_ALREADY_CONFIGURED_DEVICES"}):n.createElement(l.sA,{id:"SETTINGS_OSPF_NOT_SUPPORTED"})},504779(e,t,a){a.d(t,{A:()=>r});var n=a(296540),l=a(271856),c=a(132196),o=a(284428),s=a(641777);const i=c.AH`
  width: fit-content;
`,r=({reasons:e,reason:t,children:a,isInteractive:c,noWrap:r,position:d,fitContent:p})=>{const m=(0,o.pv)(),S=[t,...e||[]].filter(Boolean)[0]||null,E=!!S;return n.createElement(s.A,{isDisabled:{fields:E,labels:E,tooltipIcons:E,tooltipPopovers:!m.fields&&E}},n.createElement(l.A,{description:m.fields?null:S,portal:!0,isInteractive:c,noWrap:r,position:d,className:p?i:void 0},a))}}}]);