"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[7537],{437537:(e,t,n)=>{n.r(t),n.d(t,{default:()=>N});var r=n(296540),a=n(469733),l=n(705145),i=n(459449),m=n(689965),c=n(366188),s=n(920497),E=n(321235),u=n(791403),d=n(756093),A=n(701041),g=n(39705);const o=({trafficRoute:e})=>e.matching_target===d.d.INTERNET?r.createElement(i.sA,{id:"COMMON_ANY"}):e.matching_target===d.d.DOMAIN?r.createElement(g.A,{items:e.domains,getItemKey:({domain:e})=>e,renderListItem:({domain:e})=>r.createElement("span",null,e),renderMultipleItemsSummary:e=>r.createElement(r.Fragment,null,e.length," ",r.createElement(i.sA,{id:"COMMON_DOMAINS",values:{count:e.length}}))}):e.matching_target===d.d.IP?r.createElement(g.A,{items:[...e.ip_addresses?.map(e=>e.ip_or_subnet)||[]],getItemKey:e=>e,renderListItem:e=>r.createElement("span",null,e),renderMultipleItemsSummary:e=>r.createElement(r.Fragment,null,e.length," ",r.createElement(i.sA,{id:"COMMON_IP_ADDRESSES",values:{count:e.length}}))}):e.matching_target===d.d.REGION?r.createElement(A.A,{regions:e.regions}):null;var O=n(348466);const _=({trafficRoute:e})=>{if(e.matching_target!==d.d.IP)return r.createElement(i.sA,{id:"COMMON_ANY"});const t=e.ip_addresses.flatMap(e=>e.ports?.length?e.ports.map(e=>String(e)):e.port_ranges?.length?e.port_ranges.map(e=>e.port_start+O.jr+e.port_stop):[]);return t.length?r.createElement(g.A,{items:t,getItemKey:e=>e,renderListItem:e=>r.createElement("span",null,e),renderMultipleItemsSummary:e=>r.createElement(r.Fragment,null,e.length," ",r.createElement(i.sA,{id:"COMMON_PORTS",values:{count:e.length}}))}):r.createElement(i.sA,{id:"COMMON_ANY"})},M=({activeItem:e})=>{const t=(0,a.useSelector)(c.Ct);return r.createElement(m.A,null,r.createElement(E.A,{id:"COMMON_SOURCE"},r.createElement(l.A,{variant:"inherit"},r.createElement(s.A,{source:e.target_devices}))),r.createElement(E.A,{id:"COMMON_INTERFACE"},r.createElement(l.A,{variant:"inherit"},t.find(t=>t._id===e.network_id)?.name||r.createElement(i.sA,{id:"COMMON_FALLBACK"}))),r.createElement(E.A,{id:"COMMON_DESTINATION"},r.createElement(l.A,{variant:"inherit"},r.createElement(o,{trafficRoute:e}))),r.createElement(E.A,{id:"COMMON_DESTINATION_PORT"},r.createElement(l.A,{variant:"inherit"},r.createElement(_,{trafficRoute:e}))),e.origin_type?r.createElement(u.A,{policy:e}):null)},N=({activeItem:e})=>r.createElement(M,{activeItem:e})}}]);