"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[7172],{545512:(e,t,l)=>{l.d(t,{A:()=>o});var a=l(296540),i=l(71479),n=l(951106),r=l(294303),s=l(703447),c=l(888247);const d=(0,i.A)(s.A,{shouldForwardProp:e=>!["width","height"].includes(e)})`
  float: left;
  margin-right: ${({theme:{spacing:e}})=>e["spacing-s"]};
  ${({width:e})=>e&&`width: ${e}px;`}
  ${({height:e})=>e&&`height: ${e}px;`}
`,o=({defaultName:e="",client:t=null,width:l=25,height:i=25,alt:s})=>a.createElement(r.A,{alignItems:"center"},a.createElement(d,{client:t,width:l,height:i,alt:s}),a.createElement(c.A,{variant:"inherit"},(0,n.tn)(t)||e))},77172:(e,t,l)=>{l.r(t),l.d(t,{default:()=>L});var a,i=l(296540),n=l(469733),r=l(459449),s=l(582724),c=l(126457),d=l(984652),o=l(592510),m=l(963070),u=l(239417),C=l(249304),A=l(905410),h=l(845030),p=l(398300),E=l(294303),g=l(620637),w=l(396660),M=l(951106),b=l(573531),N=l(545512),O=l(149133),f=l(888247);!function(e){e.NAME="name",e.IP="ip",e.MAC="id"}(a||(a={}));const I=[{id:a.NAME,minWidth:280,sortable:!0,label:i.createElement(r.sA,{id:"COMMON_CLIENT"}),renderCell:e=>i.createElement(N.A,{client:e}),compare:(0,w.l0)(e=>(0,M.tn)(e))},{id:a.IP,minWidth:200,sortable:!0,label:i.createElement(r.sA,{id:"COMMON_IP_ADDRESS"}),renderCell:({ip:e})=>i.createElement(f.A,null,e||i.createElement(r.sA,{id:"COMMON_FALLBACK"})),compare:(0,w.l0)(({ip:e})=>e&&(0,g.isValidIpv4)(e)?(0,O.GQ)(e):0)},{id:a.MAC,minWidth:150,sortable:!0,label:i.createElement(r.sA,{id:"COMMON_MAC_ADDRESS"}),renderCell:e=>i.createElement(f.A,null,"mac"in e&&e.mac?e.mac:i.createElement(r.sA,{id:"COMMON_FALLBACK"})),compare:(0,w.l0)(e=>"mac"in e?e.mac:b.L)}],S=[{value:10,default:!0},{value:50},{value:100}],k=(0,i.memo)(({ssid:e})=>{const t=(0,n.useDispatch)(),l=(0,n.useSelector)((0,u.pO)(e)),[a,r]=(0,i.useState)(0),s=(0,i.useCallback)(e=>{e!==a&&r(e)},[a]),d=(0,i.useCallback)(()=>{r(0)},[]),o=(0,i.useCallback)(e=>{t((0,h.XP)({type:p.H.CLIENT,id:e.id})),t((0,c.AS)())},[t]),g=(0,i.useCallback)(({from:e,rowsPerPage:t})=>i.createElement(m.A,{items:l,onRowClick:o,disableColumnFilters:!0,idField:"id",initialSortBy:"ip",columns:I,rowLimit:t,rowOffset:e,truncateHeaderCells:!0}),[l,o]);return l.length?i.createElement(E.A,null,i.createElement(A.A,{wrapperFlexProps:{padding:"0",overflowX:"hidden",overflowY:"scroll"},paginationDropdownProps:{portal:!1},tableType:C.l.WIFI_CLIENTS,itemCount:l.length,onRenderTable:g,onPageChanged:s,onRowsChanged:d,pageNumber:a,rowOptions:S})):null});var v=l(705426);const L=({ssid:e})=>{const t=(0,n.useDispatch)();return(0,s.A)([(0,d.$3)(void 0,{crudCacheStrategy:{type:o.e.CACHE}})],i.createElement(v.A,{onRequestClose:()=>{t((0,c.AS)())},isOpen:!0,title:i.createElement(r.sA,{id:"COMMON_ACTIVE_CLIENTS"}),size:"large"},i.createElement(k,{ssid:e})))}}}]);