"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[6106],{606106(e,i,t){t.r(i),t.d(i,{default:()=>h});var s=t(274934),n=t(95032),r=t(535322),O=t(470070),c=t(828196),d=t(403118),l=t(1077),_=t(280674),a=t(986993),A=t(797230);const M=({item:e})=>{const{specific_mac_addresses:i,ips_or_subnets:t,type:n,network_ids:r}=e;return n!==A.lP.CLIENT_MAC||i?.length?n===A.lP.IP_OR_SUBNET?(0,s.jsx)(a.A,{items:t||[],getItemKey:e=>e,renderListItem:e=>(0,s.jsx)("span",{children:e}),renderMultipleItemsSummary:e=>(0,s.jsxs)(s.Fragment,{children:[e.length," ",(0,s.jsx)(O.sA,{id:"COMMON_IP_ADDRESSES",values:{count:e.length}})]})}):n===A.lP.CLIENT_MAC?(0,s.jsx)(_.A,{client_macs:i}):n===A.lP.NETWORK?(0,s.jsx)(l.A,{network_ids:r}):null:(0,s.jsx)(O.sA,{id:"COMMON_ANY"})},C=({item:e})=>{const{type:i,ports:t}=e;return i&&[A.lP.IP_OR_SUBNET,A.lP.NETWORK].includes(i)&&t?.length?(0,s.jsx)(a.A,{items:t||[],getItemKey:e=>e,renderListItem:e=>(0,s.jsx)("span",{children:e}),renderMultipleItemsSummary:e=>(0,s.jsxs)(s.Fragment,{children:[e.length," ",(0,s.jsx)(O.sA,{id:"COMMON_PORTS",values:{count:e.length}})]})}):(0,s.jsx)(O.sA,{id:"COMMON_ANY"})},N={[A.w$.ALL]:"COMMON_ALL",[A.w$.TCP]:"COMMON_TCP",[A.w$.UDP]:"COMMON_UDP",[A.w$.TCP_AND_UDP]:"COMMON_TCP_AND_UDP"},x=({item:e})=>{const{type:i,ip_acl_protocol:t}=e;return(0,s.jsx)(O.sA,i!==A.xC.IPV4?{id:"COMMON_ALL"}:{id:t?N[t]:"COMMON_FALLBACK"})},j={[A.tZ.ALLOW]:"COMMON_ALLOW",[A.tZ.BLOCK]:"COMMON_ACTION_BLOCK"},h=({activeItem:e})=>(0,s.jsxs)(r.A,{children:[(0,s.jsx)(c.A,{id:"COMMON_SOURCE",children:(0,s.jsx)(n.A,{variant:"inherit",isTruncated:!0,children:(0,s.jsx)(M,{item:e.traffic_source})})}),(0,s.jsx)(c.A,{id:"COMMON_SOURCE_PORT",children:(0,s.jsx)(n.A,{variant:"inherit",isTruncated:!0,children:(0,s.jsx)(C,{item:e.traffic_source})})}),(0,s.jsx)(c.A,{id:"COMMON_ACTION",children:(0,s.jsx)(n.A,{variant:"inherit",isTruncated:!0,children:(0,s.jsx)(O.sA,{id:j[e.action]})})}),(0,s.jsx)(c.A,{id:"COMMON_DESTINATION",children:(0,s.jsx)(n.A,{variant:"inherit",isTruncated:!0,children:(0,s.jsx)(M,{item:e.traffic_destination})})}),(0,s.jsx)(c.A,{id:"COMMON_DESTINATION_PORT",children:(0,s.jsx)(n.A,{variant:"inherit",isTruncated:!0,children:(0,s.jsx)(C,{item:e.traffic_destination})})}),(0,s.jsx)(c.A,{id:"COMMON_PROTOCOL",children:(0,s.jsx)(n.A,{variant:"inherit",isTruncated:!0,children:(0,s.jsx)(x,{item:e})})}),e.origin_type?(0,s.jsx)(d.A,{policy:e}):null]})}}]);