"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[4879],{814879:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var r=n(296540),i=n(705145),a=n(459449),l=n(689965),c=n(321235),m=n(791403),O=n(741095),s=n(713590),E=n(527927),_=n(39705);const A=({item:e})=>{const{specific_mac_addresses:t,ips_or_subnets:n,type:i,network_ids:l}=e;return i!==O.lP.CLIENT_MAC||t?.length?i===O.lP.IP_OR_SUBNET?r.createElement(_.A,{items:n||[],getItemKey:e=>e,renderListItem:e=>r.createElement("span",null,e),renderMultipleItemsSummary:e=>r.createElement(r.Fragment,null,e.length," ",r.createElement(a.sA,{id:"COMMON_IP_ADDRESSES",values:{count:e.length}}))}):i===O.lP.CLIENT_MAC?r.createElement(E.A,{client_macs:t}):i===O.lP.NETWORK?r.createElement(s.A,{network_ids:l}):null:r.createElement(a.sA,{id:"COMMON_ANY"})},M=({item:e})=>{const{type:t,ports:n}=e;return t&&[O.lP.IP_OR_SUBNET,O.lP.NETWORK].includes(t)&&n?.length?r.createElement(_.A,{items:n||[],getItemKey:e=>e,renderListItem:e=>r.createElement("span",null,e),renderMultipleItemsSummary:e=>r.createElement(r.Fragment,null,e.length," ",r.createElement(a.sA,{id:"COMMON_PORTS",values:{count:e.length}}))}):r.createElement(a.sA,{id:"COMMON_ANY"})},C={[O.w$.ALL]:"COMMON_ALL",[O.w$.TCP]:"COMMON_TCP",[O.w$.UDP]:"COMMON_UDP",[O.w$.TCP_AND_UDP]:"COMMON_TCP_AND_UDP"},N=({item:e})=>{const{type:t,ip_acl_protocol:n}=e;return t!==O.xC.IPV4?r.createElement(a.sA,{id:"COMMON_ALL"}):r.createElement(a.sA,{id:n?C[n]:"COMMON_FALLBACK"})},u={[O.tZ.ALLOW]:"COMMON_ALLOW",[O.tZ.BLOCK]:"COMMON_ACTION_BLOCK"},d=({activeItem:e})=>r.createElement(l.A,null,r.createElement(c.A,{id:"COMMON_SOURCE"},r.createElement(i.A,{variant:"inherit",isTruncated:!0},r.createElement(A,{item:e.traffic_source}))),r.createElement(c.A,{id:"COMMON_SOURCE_PORT"},r.createElement(i.A,{variant:"inherit",isTruncated:!0},r.createElement(M,{item:e.traffic_source}))),r.createElement(c.A,{id:"COMMON_ACTION"},r.createElement(i.A,{variant:"inherit",isTruncated:!0},r.createElement(a.sA,{id:u[e.action]}))),r.createElement(c.A,{id:"COMMON_DESTINATION"},r.createElement(i.A,{variant:"inherit",isTruncated:!0},r.createElement(A,{item:e.traffic_destination}))),r.createElement(c.A,{id:"COMMON_DESTINATION_PORT"},r.createElement(i.A,{variant:"inherit",isTruncated:!0},r.createElement(M,{item:e.traffic_destination}))),r.createElement(c.A,{id:"COMMON_PROTOCOL"},r.createElement(i.A,{variant:"inherit",isTruncated:!0},r.createElement(N,{item:e}))),e.origin_type?r.createElement(m.A,{policy:e}):null)}}]);