"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[94509],{612389(e,n,i){i.d(n,{A:()=>m});var t=i(274934),d=i(814557),r=i(938984),o=i(247816),a=i(263705),s=i(309130),l=i(100978);const c=(0,o.A)(r.A)`
  line-height: 20px;
`,m=({icon:e,description:n,action:i,footer:r,background:o,...m})=>{const{themeName:p}=(0,a.u)();return(0,t.jsxs)(l.A,{flexGrow:1,borderRadius:s.YC,padding:s.kc,background:o||d.Ay[`desktop-color-neutral-01-${p}`],gap:s.kc,flexDirection:"column",...m,children:[(0,t.jsxs)(l.A,{flexGrow:1,gap:s.kc,children:[e,n?(0,t.jsx)(c,{size:"medium",children:n}):null,i?(0,t.jsx)(l.A,{marginLeft:"auto",children:(0,t.jsx)(c,{size:"medium",children:i})}):null]}),r]})}},753959(e,n,i){i.d(n,{A:()=>s});var t=i(274934),d=i(814557),r=i(853777),o=i(263705),a=i(612389);const s=({children:e,icon:n,background:i,...s})=>{const{themeName:l}=(0,o.u)();return(0,t.jsx)(a.A,{icon:n||(0,t.jsx)(r.A,{variant:"fill",size:"original",color:d.Ay[`desktop-color-ublue-06-${l}`]}),description:e,background:i,...s})}},535322(e,n,i){i.d(n,{A:()=>h,I:()=>t});var t,d=i(274934),r=i(814557),o=i(158885),a=i(247816),s=i(565527),l=i(309130),c=i(100978),m=i(291508);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(t||(t={}));const p=(0,a.A)(c.A,(0,m.A)("marginBottom","isButtonList","margin","flex","width","padding","nested","background"))`
  background-color: ${({background:e,nested:n,theme:{themeName:i}})=>e||r.Ay[i===s.S.DARK?`desktop-color-neutral-${n?"00":"01"}-${s.S.DARK}`:`desktop-color-neutral-${n?"01":"00"}-${s.S.LIGHT}`]};
  padding: ${({isButtonList:e,padding:n})=>n||(e?`0 ${l.Ln}`:l.Ln)};
  margin-bottom: ${({marginBottom:e})=>e||l.Ln};
  ${({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}})=>r.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,u=(0,a.A)(o.A,(0,m.A)("marginBottom","margin","flex","padding","nested","background"))`
  background-color: ${({background:e,nested:n,theme:{themeName:i}})=>e||r.Ay[i===s.S.DARK?`desktop-color-neutral-${n?"00":"01"}-${s.S.DARK}`:`desktop-color-neutral-${n?"01":"00"}-${s.S.LIGHT}`]};
  margin-bottom: ${({theme:e,marginBottom:n})=>n||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:n}})=>e||r.Ay[n===s.S.DARK?`desktop-color-neutral-01-${s.S.DARK}`:`desktop-color-neutral-00-${s.S.LIGHT}`]};
      height: 48px;
      padding: 0 ${l.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0;
      > div {
        padding: 0 ${l.Ln} ${l.Ln};
      }
    }
  }
`,h=({type:e,marginBottom:n,margin:i,padding:r,flex:o,width:a,nested:s,...l})=>"items"in l?(0,d.jsx)(u,{marginBottom:n,margin:i,padding:r,flex:o,nested:s,...l}):(0,d.jsx)(p,{nested:s,width:a,marginBottom:n,margin:i,padding:r,flex:o,isButtonList:e===t.BUTTON_LIST,...l,children:l.children})},376892(e,n,i){i.d(n,{A:()=>o});var t=i(274934),d=i(938984),r=i(470070);const o=({id:e,children:n,values:i})=>(0,t.jsxs)(d.A,{color:"text-1",weight:"bold",size:"medium",children:[e?(0,t.jsx)(r.sA,{id:e,values:i}):null,n]})},894509(e,n,i){i.r(n),i.d(n,{default:()=>L});var t=i(274934),d=i(977872),r=i(602086),o=i(792929),a=i(374309),s=i(309130),l=i(753959),c=i(535322),m=i(470070),p=i(407386),u=i(197571),h=i(754924),g=i(376892),A=i(125799),x=i(95032),b=i(423564),f=i(581814),k=i(570203),$=i(283713),_=i(758698);const j=[{id:"name",label:(0,t.jsx)(m.sA,{id:"COMMON_NAME"}),sortable:!1,renderCell:({name:e})=>(0,t.jsx)(A.A,{description:e,portal:!0,noWrap:!0,children:(0,t.jsx)(x.A,{isTruncated:!0,children:e})})},{id:"ip",label:(0,t.jsx)(m.sA,{id:"SETTINGS_IP_ADDRESS_SUBNET"}),sortable:!1,renderCell:({ip:e})=>(0,t.jsx)(A.A,{description:e,portal:!0,noWrap:!0,children:(0,t.jsx)(x.A,{isTruncated:!0,children:e||(0,t.jsx)(m.sA,{id:"COMMON_FALLBACK"})})})}],L=({activeItem:{zone_key:e,network_ids:n}})=>{const i=(0,d.d4)(p.uM),A=(0,d.d4)(u.Ct),x=(0,d.d4)(h.US),L=(0,d.d4)(h.AL),S=(0,r.useMemo)(()=>n.map(e=>A.find(({_id:n})=>n===e)).filter(Boolean),[n,A]),T=(0,r.useMemo)(()=>((e,n,i,t,d)=>{const r=[];return n===_.o.EXTERNAL&&i.forEach(({_id:e,name:n,ip_aliases:i,ip:t,ipv6:d,wan_type:o,wan_type_v6:a})=>{r.push({id:e,name:n,ip:t}),o===$.mR.STATIC&&i.length&&i.forEach(n=>{r.push({id:e+n,name:"",ip:n})}),d&&a!==k.c.DISABLED&&d.forEach(n=>{r.push({id:e+n,name:"",ip:n})})}),e.filter(({attr_hidden_id:e})=>e!==f._4.WAN_LTE_FAILOVER).filter(({_id:e})=>!r.find(({id:n})=>n===e)).forEach(e=>{r.push({id:e._id,name:e.name,ip:(0,b.mC)(e)})}),t&&n===_.o.EXTERNAL&&r.push({id:d._id,name:d.name,ip:d.lte_ip}),r})(S,e,i,x,L),[S,e,i,x,L]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c.A,{padding:"0",children:(0,t.jsx)(l.A,{padding:s.kc,background:void 0,children:(0,t.jsx)(m.sA,{id:a.y[e]})})}),n.length>0?(0,t.jsx)(c.A,{type:c.I.ACCORDION,items:[{id:"networks-interfaces",label:(0,t.jsx)(g.A,{id:"SETTINGS_SECURITY_NETWORKS_INTERFACES"}),renderContent:()=>(0,t.jsx)(o.A,{idField:"id",items:T,columns:j,disableColumnFilters:!0,disableHover:!0}),openByDefault:!0}]}):null]})}}}]);