"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[9848],{545512:(e,t,l)=>{l.d(t,{A:()=>s});var a=l(296540),n=l(951106),r=l(294303),i=l(566723),c=l(703447),o=l(115829);const s=({defaultName:e="",client:t=null,width:l=25,height:s=25,alt:m})=>a.createElement(r.A,{alignItems:"center",gap:i.kc},a.createElement(c.A,{client:t,width:l,height:s,alt:m}),a.createElement(o.A,{variant:"inherit"},(0,n.tn)(t)||e))},708719:(e,t,l)=>{l.d(t,{A:()=>o});var a=l(296540),n=l(469733),r=l(602021),i=l(294303),c=l(876773);const o=({allowReadOnly:e,...t})=>{const l=(0,n.useSelector)(r.EL)&&!e;return a.createElement(i.A,{alignItems:"center"},a.createElement(c.A,{size:"medium",type:"button",...t,disabled:l||t.isDisabled}))}},169848:(e,t,l)=>{l.r(t),l.d(t,{default:()=>F});var a=l(296540),n=l(469733),r=l(984652),i=l(592510),c=l(42345),o=l(459449),s=l(708719),m=l(15095),d=l(118835),u=l(627440),C=l(337263),E=l(963070),A=l(620637),p=l(239417),w=l(249304),h=l(905410),g=l(845030),b=l(398300),f=l(126457),I=l(396660),N=l(951106),k=l(545512),S=l(149133),O=l(115829),v=l(689965);const L=[{id:"name",growthFactor:1,sortable:!0,label:a.createElement(o.sA,{id:"COMMON_CLIENT"}),renderCell:e=>a.createElement(k.A,{client:e}),compare:(0,I.l0)(e=>(0,N.tn)(e))},{id:"ip",growthFactor:1,sortable:!0,label:a.createElement(o.sA,{id:"COMMON_IP_ADDRESS"}),renderCell:({ip:e})=>a.createElement(O.A,null,e||a.createElement(o.sA,{id:"COMMON_FALLBACK"})),compare:(0,I.l0)(({ip:e})=>e&&(0,A.isValidIpv4)(e)?(0,S.GQ)(e):0)}],T=[{value:20,default:!0}],y=(0,a.memo)(({wlanConfiguration:e})=>{const t=(0,n.useDispatch)(),l=(0,n.useSelector)((0,p.pO)(e.name||"")),[r,i]=(0,a.useState)(0),c=(0,a.useCallback)(e=>{e!==r&&i(e)},[r]),o=(0,a.useCallback)(()=>i(0),[]),s=(0,a.useCallback)(e=>{t((0,g.XP)({type:b.H.CLIENT,id:e.id})),t((0,f.AS)())},[t]),m=(0,a.useCallback)(({from:e,rowsPerPage:t})=>a.createElement(E.A,{items:l,onRowClick:s,disableColumnFilters:!0,idField:"id",initialSortBy:"ip",columns:L,rowLimit:t,rowOffset:e,truncateHeaderCells:!0}),[l,s]);return l.length?a.createElement(v.A,null,a.createElement(h.A,{wrapperFlexProps:{padding:"0",overflowX:"hidden",overflowY:"scroll"},tableType:w.l.WIFI_CLIENTS,itemCount:l.length,onRenderTable:m,onPageChanged:c,onRowsChanged:o,pageNumber:r,rowOptions:T})):null}),F=({activeItem:e})=>{const t=(0,n.useDispatch)(),l=(0,m.A)(`${u.VO.CLIENTS}/${d.M.MAIN}`);return(0,a.useEffect)(()=>{t((0,r.$3)(void 0,{crudCacheStrategy:{type:i.e.CACHE}}))},[t]),a.createElement(a.Fragment,null,e?a.createElement(y,{wlanConfiguration:e}):null,a.createElement(c.A,{actions:[a.createElement(s.A,{allowReadOnly:!0,to:l,onClick:()=>t((0,C.$N)(e?.name?[e.name]:[]))},a.createElement(o.sA,{id:"SETTINGS_VIEW_IN_CLIENTS"}))]}))}}}]);