"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[69318],{170427(e,s,i){i.d(s,{A:()=>x});var t=i(274934),r=i(179102),n=i(247816),o=i(309130),c=i(304151),l=i(100978);const a=(0,n.A)(r.A)`
  white-space: nowrap;
`,d=(0,n.A)(l.A)`
  align-items: center;
`,A=(0,n.A)(l.A)`
  width: ${o.Ln};
  justify-content: flex-start;
`,x=({indicator:e,description:s,isSingleLine:i,tooltipDescription:r})=>(0,t.jsxs)(d,{marginRight:i?o.kc:0,children:[(0,t.jsx)(A,{children:e}),(0,t.jsx)(a,{size:"small",color:"text-3",children:s}),r?(0,t.jsx)(c.A,{description:r}):null]})},883717(e,s,i){i.d(s,{A:()=>y,T:()=>v});var t=i(274934),r=i(602086),n=i(977872),o=i(505817),c=i(573106),l=i(593330),a=i(892658),d=i(882316),A=i(29834),x=i(232421),O=i(247816),j=i(263705),p=i(306212),u=i(442175),E=i(309130),_=i(100978),m=i(470070),P=i(940229),C=i(576024),S=i(469890),D=i(956978),h=i(754924),I=i(940563),M=i(977782),g=i(291508),b=i(170427);const T=(0,O.A)("div")`
  display: grid;
  grid-template-columns: repeat(3, minmax(min-content, 1fr));
  gap: ${E.YC};
  margin-top: ${E.kc};
`,L=(0,O.A)(_.A)`
  gap: ${E.kc};
  row-gap: ${E.YC};
  flex-wrap: wrap;
`,v=(0,O.A)(p.A,(0,g.A)("borderColor"))`
  flex-shrink: 0;
  border-radius: 0;
  border: ${({borderColor:e,theme:{themeName:s}})=>e&&`1px solid ${(0,P.oX)(e,s)}`};
`,k=(e,s)=>e===M.s.PASSTHROUGH?1:e===M.s.PASSIVE?2:e===M.s.POE?3:e===M.s.POE_PLUS?4:e===M.s.POE_PLUS_PLUS?5:6,y=({deviceMac:e,isSingleLine:s=!1,hidePoe:i=!1,hideDisabled:O=!1,hideDisconnected:p=!1,displayedSpeedList:E})=>{const{themeName:_}=(0,j.u)(),g=(0,n.d4)((0,r.useMemo)(()=>(0,h.tG)(e),[e])),{type:y,model:R}=g;return(0,r.useMemo)(()=>{const e=(0,C.MB)(g),r=(0,D.NuO)(g),n=(0,S._L)(g,r),j=O||(0,D.m_j)(g)||(0,D.Syn)(g)||(0,D.Fp0)(g),h=s?L:T,R=Array.from(n).sort(k).map(e=>{switch(!0){case e===M.s.POE_PLUS_PLUS_PLUS:return(0,t.jsx)(b.A,{description:(0,t.jsx)(m.sA,{id:"COMMON_DEVICE_POE_MODE_POE_PLUS_PLUS_PLUS"}),indicator:(0,t.jsx)(c.A,{color:o.Ay[`desktop-color-neutral-08-${_}`]})},e);case e===M.s.POE_PLUS_PLUS:return(0,t.jsx)(b.A,{description:(0,t.jsx)(m.sA,{id:"COMMON_DEVICE_POE_MODE_POE_PLUS_PLUS"}),indicator:(0,t.jsx)(l.A,{color:o.Ay[`desktop-color-neutral-08-${_}`]})},e);case e===M.s.POE_PLUS:return(0,t.jsx)(b.A,{description:(0,t.jsx)(m.sA,{id:"COMMON_DEVICE_POE_MODE_POE_PLUS"}),indicator:(0,t.jsx)(a.A,{color:o.Ay[`desktop-color-neutral-08-${_}`]})},e);case e===M.s.PASSTHROUGH||e===M.s.PASSIVE||e===M.s.POE:return(0,t.jsx)(b.A,{description:(0,t.jsx)(m.sA,{id:e===M.s.PASSIVE?"COMMON_DEVICE_POE_MODE_PASSIVE":"COMMON_DEVICE_POE_MODE_POE"}),indicator:(0,t.jsx)(d.A,{color:o.Ay[`desktop-color-neutral-08-${_}`]})},e);default:return null}});return(0,t.jsxs)(h,{children:[e.filter(e=>!E||E.includes(e)).sort((e,s)=>e-s).map(e=>(0,t.jsx)(b.A,{description:(0,u.ir)(e),indicator:(0,t.jsx)(v,{color:(0,P.oX)((I.A[e]??I.A.DEFAULT).background,_)})},e)),p?null:(0,t.jsx)(b.A,{description:(0,t.jsx)(m.sA,{id:"COMMON_DISCONNECTED"}),indicator:(0,t.jsx)(v,{color:(0,P.oX)(I.A.DEFAULT.background,_)})},"disconnected"),j?null:(0,t.jsx)(b.A,{description:(0,t.jsx)(m.sA,{id:"COMMON_DISABLED"}),indicator:(0,t.jsx)(v,{color:"transparent",borderColor:I.A.DEFAULT.background}),isSingleLine:s},"disabled"),i?null:R,!(0,D.Tbi)({type:y})||(0,D.Syn)(g)||(0,D.Fp0)(g)?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b.A,{description:(0,t.jsx)(m.sA,{id:"COMMON_AGGREGATING"}),indicator:(0,t.jsx)(x.A,{color:o.Ay[`desktop-color-neutral-08-${_}`]})},"aggregating"),(0,t.jsx)(b.A,{indicator:(0,t.jsx)(A.A,{}),description:(0,t.jsx)(m.sA,{id:"DEVICE_PORT_STATE_MIRROR"}),tooltipDescription:(0,t.jsx)(m.sA,{id:"DEVICE_PORT_STATE_MIRROR_TOOLTIP"})},"mirror")]})]})},[R,i,O,E,_])}},648175(e,s,i){i.d(s,{A:()=>n});var t=i(274934),r=i(83985);const n=({children:e,...s})=>(0,t.jsx)(r.A,{variant:"secondary-emphasis",...s,children:e})},732025(e,s,i){i.d(s,{A:()=>l});var t=i(274934),r=i(602086),n=i(376892),o=i(535322),c=i(560151);const l=(0,r.memo)(({mac:e,object:s})=>(0,t.jsx)(o.A,{type:o.I.ACCORDION,items:[{id:"systemPerformance",openByDefault:!1,label:(0,t.jsx)(n.A,{id:"DEVICE_PROPERTY_SYSTEM_STATISTICS"}),renderContent:()=>(0,t.jsx)(c.A,{mac:e,object:s})}]}))},231083(e,s,i){i.d(s,{A:()=>l});var t=i(274934),r=i(602086),n=i(648175),o=i(470070),c=i(850352);const l=({mac:e})=>{const{handleGoToPortsPage:s}=(0,c.e)(),i=(0,r.useCallback)(()=>{s(e)},[s,e]);return(0,t.jsx)(n.A,{onClick:i,width:"full",children:(0,t.jsx)(o.sA,{id:"COMMON_PORT_MANAGER"})})}},613609(e,s,i){i.d(s,{A:()=>O});var t=i(274934),r=i(247816),n=i(309130),o=i(100978),c=i(535322),l=i(883717),a=i(251323),d=i(231083);const A=(0,r.A)(o.A)`
  > div {
    width: 100%;
  }
`,x=({activeItem:e,activeItem:{port_table:s,mac:i},showFullScreenDiagramButton:r,disableOnPortClick:c,isStacking:A,multipleDisplayedDevicesData:x})=>{const O=0!==(s||[]).length;return(0,t.jsxs)(t.Fragment,{children:[O?(0,t.jsxs)(o.A,{position:"relative",flexDirection:"column",children:[(0,t.jsx)(o.A,{flexDirection:"column",justifyContent:"center",children:A?(x?.length?x:[e]).map((e,s)=>{const i=e.port_table?.[0]?.unit_id;return(0,t.jsx)(a.A,{activeItem:e,disableOnPortClick:r||c,isStacking:!0},void 0!==i?`${e.mac}-${i}`:e.mac||s)}):(0,t.jsx)(a.A,{activeItem:e,disableOnPortClick:r||c})}),(0,t.jsx)(l.A,{deviceMac:i})]}):null,r&&O?(0,t.jsx)(o.A,{paddingTop:n.Ln,justifyContent:"center",children:(0,t.jsx)(d.A,{mac:i})}):null]})},O=({useBubbleWrapper:e=!0,...s})=>e?(0,t.jsx)(A,{children:(0,t.jsx)(c.A,{flex:"unset",children:(0,t.jsx)(x,{...s})})}):(0,t.jsx)(x,{...s})},469318(e,s,i){i.r(s),i.d(s,{default:()=>O});var t=i(274934),r=i(376892),n=i(535322),o=i(532565),c=i(412160),l=i(613609),a=i(113592),d=i(320018),A=i(732025),x=i(392184);const O=({activeItem:e,activeItem:{mac:s,model:i}})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.A,{type:n.I.ACCORDION,items:[{id:"portsOverview",openByDefault:!0,label:(0,t.jsx)(r.A,{id:"DEVICE_PROPERTY_HEADER_PORTS"}),renderContent:()=>(0,t.jsx)(l.A,{activeItem:e,showFullScreenDiagramButton:!0,useBubbleWrapper:!1})}]}),(0,t.jsx)(n.A,{type:n.I.ACCORDION,items:[{id:"outlets",openByDefault:!0,label:(0,t.jsx)(r.A,{id:"COMMON_OUTLET"}),renderContent:()=>(0,t.jsx)(x.A,{activeItem:e,hidePorts:!0})}]}),(0,t.jsx)(d.A,{mac:s,model:i,logType:a.F.DEVICE,ignoreActionableValues:[c.dl.DEVICE],label:"COMMON_HISTORY"}),(0,t.jsx)(A.A,{mac:s,object:o.qv.GW})]})}}]);