"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[45846,89965],{86571:(e,t,n)=>{n.d(t,{A:()=>r});var i=n(296540),a=n(217439),o=n(699784);const r=({id:e,children:t,values:n})=>i.createElement(a.A,{color:"text-1",weight:"bold",size:"medium"},e?i.createElement(o.sA,{id:e,values:n}):null,t)},216211:(e,t,n)=>{n.d(t,{e:()=>g});var i=n(956347),a=n(469733),o=n(296540),r=n(15095),d=n(627440),l=n(431247),m=n(293016),s=n(649413),c=n(497470);const g=()=>{const e=(0,a.useDispatch)(),t=(0,i.W6)(),n=(0,r.A)(`${d.VO.PORTS}`);return{handleGoToPortsPage:(0,o.useCallback)((i,a,o)=>{if(i)if(e((0,c.gU)(!0)),e((0,c.U)((0,s.HN)(m.F7.DEVICE,[i]))),o&&(e((0,c.IU)(!0)),e((0,c.E1)(!1))),a){const t=(0,l.FS)(i,a);e((0,c.Ao)([t]))}else e((0,c.Ao)([]));t.push(n)},[n,t,e])}}},538610:(e,t,n)=>{n.r(t),n.d(t,{default:()=>I});var i=n(469733),a=n(296540),o=n(217439),r=n(705145),d=n(903216),l=n(294303),m=n(689965),s=n(699784),c=n(801081),g=n(25553),u=n(87485);const h="clientTrafficInsights",p="mac",f=e=>(0,c.Mz)((e=>({models:t})=>(0,g.JC)(h,t,{queryParams:{mac:e}},{idField:p}))(e),e=>(0,u.kh)(e)[0]);var A=n(691189);var b=n(275357),$=n(540739),k=n(525901);const x={},E=[b.dl.CLIENT],I=({activeItem:{mac:e,model:t}})=>{const n=(0,i.useDispatch)(),g=(0,i.useSelector)((0,a.useMemo)(()=>(e=>(0,c.Mz)(f(e),e=>e?.traffic_overview))(e),[e]));return(0,a.useEffect)(()=>{(!x[e]||Date.now()-x[e]>=3e5)&&n(((e,t={},n={})=>(0,A.An)([{model:h,payload:t=>[{...t,[p]:e}]}],"/v2/api/site/{site}/client/:mac:/traffic-insights".replace(":mac:",e),{queryParams:{mac:e},...t},{idField:p,...n}))(e)).then(()=>{x[e]=Date.now()})},[n,e]),a.createElement(a.Fragment,null,a.createElement(m.A,null,a.createElement(l.A,{justifyContent:"space-between"},a.createElement(o.A,{color:"text-2",size:"medium"},a.createElement(s.sA,{id:"CLIENTS_INSIGHTS_LOCAL_NET_DAILY_ACTIVITY"})),a.createElement(r.A,{color:"text-3",size:"medium",isTruncated:!0},(0,d.FI)(g?.["24hr_bytes"]||0)))),a.createElement(k.A,{mac:e,model:t,logType:$.F.CLIENT,label:"CLIENTS_INSIGHTS_CL",ignoreActionableValues:E}))}},689965:(e,t,n)=>{n.d(t,{A:()=>u,I:()=>i});var i,a=n(296540),o=n(822336),r=n(427853),d=n(71479),l=n(825032),m=n(566723),s=n(294303);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(i||(i={}));const c=(0,d.A)(s.A,{shouldForwardProp:e=>!["marginBottom","isButtonList","margin","flex","width","padding","nested","background"].includes(e)})`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||o.Ay[n===l.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  padding: ${({theme:e,isButtonList:t,padding:n})=>n||(t?`0 ${e.spacing["spacing-l"]}`:e.spacing["spacing-l"])};
  margin-bottom: ${({theme:e,marginBottom:t})=>t||e.spacing["spacing-l"]};
  ${({margin:e})=>e?`margin: ${e};`:""}
  border-radius: 8px;
  flex-direction: column;
  width: ${({width:e="100%"})=>e};
  flex: ${({flex:e=0})=>e};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  ${({isButtonList:e})=>e?`\n    > div {\n      display: flex;\n      height: 48px;\n      border-bottom: ${({theme:{themeName:e}})=>o.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,g=(0,d.A)(r.A,{shouldForwardProp:e=>!["marginBottom","margin","flex","padding","nested","background"].includes(e)})`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||o.Ay[n===l.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  margin-bottom: ${({theme:e,marginBottom:t})=>t||e.spacing["spacing-l"]};
  ${({margin:e})=>e?`margin: ${e};`:""}
  ${({padding:e})=>e?`padding: ${e};`:""}
  border-radius: 8px;
  flex-direction: column;
  flex: ${({flex:e=0})=>e};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  > li {
    > div:first-child {
      background: ${({background:e,theme:{themeName:t}})=>e||o.Ay[t===l.S.DARK?"desktop-color-neutral-01-dark":"desktop-color-neutral-00-light"]};
      height: 48px;
      padding: 0 ${m.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0 ${m.Ln} ${m.Ln};
      > div {
        padding: 0;
      }
    }
  }
`,u=({type:e,marginBottom:t,margin:n,padding:o,flex:r,width:d,nested:l,...m})=>"items"in m?a.createElement(g,{marginBottom:t,margin:n,padding:o,flex:r,nested:l,...m}):a.createElement(c,{nested:l,width:d,marginBottom:t,margin:n,padding:o,flex:r,isButtonList:e===i.BUTTON_LIST,...m},m.children)}}]);