"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[50277],{866062(e,s,t){t.r(s),t.d(s,{default:()=>w});var a=t(274934),i=t(602086),n=t(237725),c=t(977872),o=t(309920),r=t(244081),l=t(213920),d=t(222361),M=t(401004),T=t(724081),A=t(429622),u=t(645648),x=t(104997),O=t(331302),S=t(788970),h=t(949832);const C=e=>{const s=(0,c.d4)(h.Ro);return(0,a.jsx)(S.A,{routes:s,...e})};var N=t(635496);const p={[N.M.MAIN]:`${O.Si[x.VO.CLIENTS]}`.replace(O.wk,N.M.MAIN),[N.M.DHCP]:`${O.Si[x.VO.CLIENTS]}`.replace(O.wk,N.M.DHCP),[N.M.HOTSPOT]:`${O.Si[x.VO.CLIENTS]}`.replace(O.wk,N.M.HOTSPOT)};var I=t(775256),j=t(692),b=t(101134),m=t(85254),H=t(504238),P=t(947852),E=t(194581),L=t(470070);const f=[{icon:(0,a.jsx)(H.A,{size:"original"}),label:(0,a.jsx)(L.sA,{id:"COMMON_MAIN"}),id:N.M.MAIN},{icon:(0,a.jsx)(E.A,{size:"original"}),label:(0,a.jsx)(L.sA,{id:"COMMON_IP_TABLE"}),id:N.M.DHCP},{icon:(0,a.jsx)(P.A,{size:"original"}),label:(0,a.jsx)(L.sA,{id:"COMMON_HOTSPOT"}),id:N.M.HOTSPOT}],g=(0,i.memo)(({clientsRoute:e})=>{const s=(0,n.W6)(),t=(0,c.d4)(h.Ro),o=(0,b.A)(`${x.VO.CLIENTS}/${N.M.MAIN}`),r=(0,b.A)(`${x.VO.CLIENTS}/${N.M.DHCP}`),l=(0,b.A)(`${x.VO.CLIENTS}/${N.M.HOTSPOT}`),d=(0,i.useCallback)(({id:e})=>{switch(e){case N.M.MAIN:s.push(o);break;case N.M.DHCP:s.push(r);break;case N.M.HOTSPOT:s.push(l)}},[o,r,l,s]),M=(0,i.useMemo)(()=>f.filter(({id:e})=>t[e][x.o9.NAVIGATION][x.mx.AVAILABLE]),[t]);return(0,a.jsx)(m.A,{tabs:M,selectedTab:e,onSelectTab:d})});var k=t(96732);const v=(0,i.memo)(({clientsRoute:e,hotspotRoute:s})=>{const{footer:t,columns:n,editor:c,children:o}=(0,i.useMemo)(()=>(0,k.u)(s)[e]||{},[e,s]),r=(0,i.useMemo)(()=>(0,k.Z)(e,s),[e,s]);return(0,a.jsx)(j.A,{leftFilterPageId:d.g1.CLIENTS,leftFilterColumnsId:r,tabs:(0,a.jsx)(g,{clientsRoute:e}),footer:t,columns:n,editor:c,children:o})});var $=t(911851);const w=({match:{params:e,params:{section:s=N.M.MAIN,subSection:t=$.z.GUESTS},path:S}})=>{const h=(0,c.wA)();return(0,i.useEffect)(()=>{h((0,I.y)(void 0,{crudCacheStrategy:{type:r.e.CACHE}}))},[h]),(0,T.A)([(0,M.Zi)(l.B.CLIENTS)],(0,a.jsx)(A.A,{children:(0,a.jsx)(u.A,{leftFilterPageId:d.g1.CLIENTS,content:(0,a.jsx)(v,{clientsRoute:s,hotspotRoute:t}),overflow:"hidden",children:(0,a.jsx)(i.Suspense,{fallback:null,children:(0,a.jsxs)(n.dO,{children:[(0,a.jsx)(o.F,{path:p[N.M.MAIN],render:e=>(0,a.jsx)(C,{id:N.M.MAIN,...e})}),(0,a.jsx)(o.F,{exact:!0,path:p[N.M.DHCP],render:e=>(0,a.jsx)(C,{id:N.M.DHCP,...e})}),(0,a.jsx)(o.F,{exact:!0,path:p[N.M.HOTSPOT].replace(O.hH,t),render:e=>(0,a.jsx)(C,{id:N.M.HOTSPOT,...e,subSection:t})}),(0,a.jsx)(o.F,{exact:!0,path:p[N.M.HOTSPOT],children:(0,a.jsx)(n.rd,{to:(0,n.tW)(S,{...e,section:N.M.HOTSPOT,subSection:$.z.GUESTS})})}),(0,a.jsx)(o.F,{exact:!0,path:O.Si[x.VO.CLIENTS],children:(0,a.jsx)(n.rd,{to:(0,n.tW)(S,{...e,section:N.M.MAIN})})})]})})})}),{trackingName:x.VO.CLIENTS})}},85254(e,s,t){t.d(s,{A:()=>O});var a=t(274934),i=t(602086),n=t(383061),c=t(590979),o=t(202730),r=t(39279),l=t(247816),d=t(309130);const M=(0,l.A)("div")`
  > nav > button {
    display: flex;
    flex-direction: row;
    gap: ${d.YC};
  }
`;var T=t(409844);const A=T.AH`
  height: 32px;
`,u=T.AH`
  padding: ${d.YC} !important;
`,x=T.AH`
  padding: ${d.YC} ${d.Ln} !important;
`,O=({selectedTab:e,tabs:s,...t})=>{const l=s.length<=2,d=(0,i.useMemo)(()=>l?s:s.map(s=>e===s.id?s:{...s,label:void 0}),[s,e,l]);return d.length>1?(0,a.jsx)(r.T_,{...c.A.addDataTestId(o.b.LEFT_FILTER_PANEL_TABS),children:(0,a.jsx)(M,{children:(0,a.jsx)(n.A,{variant:"capsule",stretched:!0,className:A,tabsClassName:A,tabClassName:u,selectedTabClassName:l?void 0:x,tabs:d,selectedTab:e,...t})})}):null}}}]);