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