"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[54404],{400270:(e,t,a)=>{a.d(t,{A:()=>r});var l=a(296540),n=a(629318);const r=(0,a(51946).w)(e=>(0,l.createElement)("svg",(0,n.d)({viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em"},e),(0,l.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 3a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1H4Zm8 8a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1h-4Z",fill:"currentColor",className:e.twotonedclassname}),(0,l.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 4h4v4H4V4ZM3 4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4Zm9 8h4v4h-4v-4Zm-1 0a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1v-4Zm1.854-4.854L11.707 6H16v3.5a.5.5 0 0 0 1 0v-4a.5.5 0 0 0-.5-.5h-4.793l1.147-1.146a.5.5 0 0 0-.708-.708l-2 2a.5.5 0 0 0 0 .708l2 2a.5.5 0 0 0 .708-.708ZM8.293 15H3.5a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 1 0V14h4.293l-1.147-1.146a.5.5 0 0 1 .708-.708l2 2a.5.5 0 0 1 0 .708l-2 2a.5.5 0 0 1-.708-.708L8.293 15Z",fill:"currentColor",className:e.baseclassname}),(0,l.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 3a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1H4Zm7 9a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1v-4Zm1.854-4.854L11.707 6H16v3.5a.5.5 0 0 0 1 0v-4a.5.5 0 0 0-.5-.5h-4.793l1.147-1.146a.5.5 0 0 0-.708-.708l-2 2a.5.5 0 0 0 0 .708l2 2a.5.5 0 0 0 .708-.708ZM8.293 15H3.5a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 1 0V14h4.293l-1.147-1.146a.5.5 0 0 1 .708-.708l2 2a.5.5 0 0 1 0 .708l-2 2a.5.5 0 0 1-.708-.708L8.293 15Z",fill:"currentColor",className:e.fillclassname})))},814879:(e,t,a)=>{a.r(t),a.d(t,{default:()=>C});var l=a(296540),n=a(705145),r=a(689965),i=a(699784),c=a(321235),m=a(791403),s=a(713590),O=a(527927),d=a(39705),E=a(741095);const M=({item:e})=>{const{specific_mac_addresses:t,ips_or_subnets:a,type:n,network_ids:r}=e;return n!==E.lP.CLIENT_MAC||t?.length?n===E.lP.IP_OR_SUBNET?l.createElement(d.A,{items:a||[],getItemKey:e=>e,renderListItem:e=>l.createElement("span",null,e),renderMultipleItemsSummary:e=>l.createElement(l.Fragment,null,e.length," ",l.createElement(i.sA,{id:"COMMON_IP_ADDRESSES",values:{count:e.length}}))}):n===E.lP.CLIENT_MAC?l.createElement(O.A,{client_macs:t}):n===E.lP.NETWORK?l.createElement(s.A,{network_ids:r}):null:l.createElement(i.sA,{id:"COMMON_ANY"})},_=({item:e})=>{const{type:t,ports:a}=e;return t&&[E.lP.IP_OR_SUBNET,E.lP.NETWORK].includes(t)&&a?.length?l.createElement(d.A,{items:a||[],getItemKey:e=>e,renderListItem:e=>l.createElement("span",null,e),renderMultipleItemsSummary:e=>l.createElement(l.Fragment,null,e.length," ",l.createElement(i.sA,{id:"COMMON_PORTS",values:{count:e.length}}))}):l.createElement(i.sA,{id:"COMMON_ANY"})},u={[E.w$.ALL]:"COMMON_ALL",[E.w$.TCP]:"COMMON_TCP",[E.w$.UDP]:"COMMON_UDP",[E.w$.TCP_AND_UDP]:"COMMON_TCP_AND_UDP"},A=({item:e})=>{const{type:t,ip_acl_protocol:a}=e;return t!==E.xC.IPV4?l.createElement(i.sA,{id:"COMMON_ALL"}):l.createElement(i.sA,{id:a?u[a]:"COMMON_FALLBACK"})},o={[E.tZ.ALLOW]:"COMMON_ALLOW",[E.tZ.BLOCK]:"COMMON_ACTION_BLOCK"},C=({activeItem:e})=>l.createElement(r.A,null,l.createElement(c.A,{id:"COMMON_SOURCE"},l.createElement(n.A,{variant:"inherit",isTruncated:!0},l.createElement(M,{item:e.traffic_source}))),l.createElement(c.A,{id:"COMMON_SOURCE_PORT"},l.createElement(n.A,{variant:"inherit",isTruncated:!0},l.createElement(_,{item:e.traffic_source}))),l.createElement(c.A,{id:"COMMON_ACTION"},l.createElement(n.A,{variant:"inherit",isTruncated:!0},l.createElement(i.sA,{id:o[e.action]}))),l.createElement(c.A,{id:"COMMON_DESTINATION"},l.createElement(n.A,{variant:"inherit",isTruncated:!0},l.createElement(M,{item:e.traffic_destination}))),l.createElement(c.A,{id:"COMMON_DESTINATION_PORT"},l.createElement(n.A,{variant:"inherit",isTruncated:!0},l.createElement(_,{item:e.traffic_destination}))),l.createElement(c.A,{id:"COMMON_PROTOCOL"},l.createElement(n.A,{variant:"inherit",isTruncated:!0},l.createElement(A,{item:e}))),e.origin_type?l.createElement(m.A,{policy:e}):null)}}]);