"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[7982,89965],{143053:(e,t,n)=>{n.d(t,{X:()=>l,o:()=>r});var a=n(742920),o=n(286388);const l=()=>({icon:a.C.danger,message:"COMMON_LOG_API_ERROR"}),r={[o.DU.RISK]:[],[o.DU.ACTION]:[],[o.DU.DIRECTION]:[],[o.DU.PROTOCOL]:[],[o.DU.POLICY]:[],[o.DU.POLICY_TYPE]:[],[o.DU.SERVICE]:[],[o.DU.SOURCE_HOST]:[],[o.DU.SOURCE_MAC]:[],[o.DU.SOURCE_IP]:[],[o.DU.SOURCE_PORT]:[],[o.DU.SOURCE_NETWORK_ID]:[],[o.DU.SOURCE_DOMAIN]:[],[o.DU.SOURCE_ZONE_ID]:[],[o.DU.SOURCE_REGION]:[],[o.DU.DESTINATION_HOST]:[],[o.DU.DESTINATION_MAC]:[],[o.DU.DESTINATION_IP]:[],[o.DU.DESTINATION_PORT]:[],[o.DU.DESTINATION_NETWORK_ID]:[],[o.DU.DESTINATION_DOMAIN]:[],[o.DU.DESTINATION_ZONE_ID]:[],[o.DU.DESTINATION_REGION]:[],[o.DU.IN_NETWORK_ID]:[],[o.DU.OUT_NETWORK_ID]:[],[o.DU.NEXT_AI_QUERY]:[],[o.DU.EXCEPT_FOR]:[],[o.DU.SEARCH_TEXT]:"",[o.DU.TIMESTAMP_FROM]:0,[o.DU.TIMESTAMP_TO]:0,[o.DU.PAGE_NUMBER]:0,[o.DU.PAGE_SIZE]:0,[o.DU.SKIP_COUNT]:!1}},263130:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(296540),o=n(927099),l=n(71479),r=n(998837),i=n(566723),d=n(294303);const c=(0,l.A)(o.A)`
  line-height: 20px;
`,s=({icon:e,description:t,action:n,footer:o,background:l,...s})=>{const m=(0,r.u)().motifPalette.neutral01;return a.createElement(d.A,{flexGrow:1,borderRadius:i.YC,padding:i.kc,background:l||m,gap:i.kc,flexDirection:"column",...s},a.createElement(d.A,{flexGrow:1,gap:i.kc},e,t?a.createElement(c,{size:"body"},t):null,n?a.createElement(d.A,{marginLeft:"auto"},a.createElement(c,{size:"body"},n)):null),o)}},307982:(e,t,n)=>{n.r(t),n.d(t,{default:()=>H});var a,o=n(469733),l=n(296540),r=n(208288);!function(e){e.ALL="ALL",e.FILTERED="FILTERED"}(a||(a={}));var i=n(716654),d=n(165126),c=n(758649),s=n(424815),m=n(282556),u=n(845030),E=n(699784),A=n(469987),g=n(602021),D=n(198494),h=n(286388),p=n(516693),O=n(691189),T=n(742920),I=n(887831);const C=`${n(655773).gI}/export`;var _=n(143053),U=n(71479),f=n(566723),S=n(294303);const L=(0,U.A)(S.A)`
  gap: ${f.kc};
  width: 100%;
  justify-content: flex-end;
  padding: ${f.S2} ${f.Ln};
`,N=(0,l.memo)(({calendarValue:e,flowsDownloadMode:t})=>{const n=(0,o.useDispatch)(),r=(0,o.useSelector)(i.uK),U=(0,o.useSelector)(i.cd),f=(0,l.useCallback)(()=>{n((0,u.K5)())},[n]),S=(0,o.useSelector)(m.zi),N=(0,o.useSelector)(D.BQ),R=(0,o.useSelector)(g.hq),k=(0,l.useMemo)(()=>new Intl.DateTimeFormat(S,{hourCycle:N,timeZone:R,month:"short",day:"numeric",year:"numeric"}),[N,R,S]),{timestampFrom:b,timestampTo:$}=(0,l.useMemo)(()=>({timestampFrom:new Date(e?.start.toString()).getTime(),timestampTo:new Date(e?.end.toString()).getTime()}),[e?.start,e?.end]),w=(0,l.useCallback)(()=>{n(((e={},t={})=>(0,O.vB)(p.aC,null,null,I.A.POST,C,e,e.data,{failureToast:{icon:T.C.danger,message:"COMMON_NOTICE_REQUEST_ERROR"},fetchConfig:{headers:{"Content-Type":"application/json"},getAllPostData:!0},...t}))({data:{...(0,d.A)(t===a.FILTERED?r:_.o,[h.DU.PAGE_NUMBER,h.DU.PAGE_SIZE]),[h.DU.TIMESTAMP_FROM]:b,[h.DU.TIMESTAMP_TO]:$}},{onBeforeCall:()=>{n((0,A.mh)(!0))}})).then(e=>{(0,s.P)(`${k.format(b)}_${k.format($)}.csv`,e)}).finally(()=>{n((0,A.mh)(!1))})},[n,b,$,r,k,t]);return l.createElement(L,null,l.createElement(c.A,{type:"button",variant:"default",size:"medium",onClick:f},l.createElement(E.sA,{id:"COMMON_ACTION_CANCEL"})),l.createElement(c.A,{type:"button",variant:"primary",size:"medium",onClick:w,disabled:!b||!$||U,loader:U?"spinner":void 0},l.createElement(E.sA,{id:"COMMON_DOWNLOAD"})))});var R=n(497336),k=n.n(R),b=n(54227),$=n(217439),w=n(74750),x=n(48450),M=n(162420),y=n(149188),P=n(89603),F=n(689965),v=n(263130),B=n(367464),V=n(389017),z=n(896297),K=n(822336);const W=(0,U.A)(S.A)`
  width: 100%;
  flex-direction: column;
  padding-top: ${f.YC};
  gap: ${f.xO};
`,G=(0,U.A)(S.A)`
  gap: ${f.Ln};
`,j=(0,U.A)(S.A)`
  flex-direction: column;
  gap: ${f.YC};
`,Y=(0,U.A)(S.A)`
  width: 100%;
  align-items: center;
  gap: ${f.xO};
  background-color: ${({theme:{themeName:e}})=>K.Ay[`desktop-color-neutral-02-${e}`]};
  height: 32px;
  padding: 0 ${f.kc};
  border-radius: ${K.Ay["desktop-radius-base"]};
  > :last-child {
    margin-left: auto;
  }
  color: ${({theme:{themeName:e}})=>K.Ay[`desktop-color-text-1-${e}`]};
  font-size: 14px;
`,Z=({calendarValue:e,setCalendarValue:t,flowsDownloadMode:n,setFlowsDownloadMode:d,flowsInInitialState:c})=>{const[s,m]=(0,l.useState)(!1),u=(0,o.useSelector)(i.cd),A=(0,l.useCallback)(e=>{m(e)},[]),g=(0,l.useCallback)(e=>{e&&t(e)},[t]),D=(0,z.A)(),h=(0,V.A)(),{maxValue:p,minValue:O}=(0,l.useMemo)(()=>({maxValue:(0,r.A)(k()(new Date),"CalendarDateTime"),minValue:(0,r.A)(new Date(0),"CalendarDateTime")}),[]),T=(0,l.useMemo)(()=>[{id:a.ALL,children:l.createElement(E.sA,{id:"FLOWS_ALL_FLOWS"}),onChange:()=>{d(a.ALL)},checked:n===a.ALL},{id:a.FILTERED,children:l.createElement(E.sA,{id:"FLOWS_FILTERED_FLOWS"}),onChange:()=>{d(a.FILTERED)},checked:n===a.FILTERED}],[n,d]),I=(0,l.useMemo)(()=>[[e?.start.day,e?.start.month,e?.start.year].filter(Boolean).join(" / "),[e?.end.day,e?.end.month,e?.end.year].filter(Boolean).join(" / ")].join(" - "),[e?.start.day,e?.start.month,e?.start.year,e?.end.day,e?.end.month,e?.end.year]);return l.createElement(F.A,null,l.createElement(W,null,l.createElement(j,null,l.createElement($.A,{size:"small",color:u?"disabled":"text-3"},l.createElement(E.sA,{id:"COMMON_DATE_RANGE"})),l.createElement(x.X,{isDisabled:u,isOpen:s,value:e,"aria-label":"Flows Download Date Range Picker",localizationTexts:h,onChange:g,onOpenChange:A,presets:D,minValue:O,maxValue:p},l.createElement(w.A,{style:{width:"100%",...B.e,...u?{pointerEvents:"none",opacity:.3}:{}}},l.createElement(Y,null,l.createElement(y.A,{size:"original"}),I,l.createElement(P.A,{size:"original"}))))),c?null:l.createElement(G,null,T.map(({id:e,children:t,checked:n,onChange:a})=>l.createElement(b.A,{key:e,id:e,checked:n,disabled:u,onChange:a},t))),u?l.createElement(v.A,{icon:l.createElement(M.A,{size:"original",variant:"fill",isActive:!0}),description:l.createElement(E.sA,{id:"FLOWS_DOWNLOAD_ALERT"})}):null))},X=(0,U.A)(S.A)`
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
`,H=()=>{const e=(0,o.useSelector)(i._S),{startDate:t,endDate:n}=(0,o.useSelector)(i.tT),[d,c]=(0,l.useState)({start:(0,r.A)(t,"CalendarDateTime"),end:(0,r.A)(n,"CalendarDateTime")}),[s,m]=(0,l.useState)(e?a.ALL:a.FILTERED);return(0,l.useEffect)(()=>{m(e?a.ALL:a.FILTERED)},[e]),l.createElement(X,null,l.createElement(Z,{calendarValue:d,setCalendarValue:c,flowsDownloadMode:s,setFlowsDownloadMode:m,flowsInInitialState:e}),l.createElement(N,{calendarValue:d,flowsDownloadMode:s}))}},424815:(e,t,n)=>{n.d(t,{P:()=>o});var a=n(348466);function o(e,t,n){const o=URL.createObjectURL(t),l=document.createElement("a");l.id=n,l.href=o,l.download=e.replace(/[^A-Za-z0-9_\-.]/g,a.jr),document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(o)}},689965:(e,t,n)=>{n.d(t,{A:()=>E,I:()=>a});var a,o=n(296540),l=n(822336),r=n(427853),i=n(71479),d=n(825032),c=n(566723),s=n(294303);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(a||(a={}));const m=(0,i.A)(s.A,{shouldForwardProp:e=>!["marginBottom","isButtonList","margin","flex","width","padding","nested","background"].includes(e)})`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||l.Ay[n===d.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  padding: ${({theme:e,isButtonList:t,padding:n})=>n||(t?`0 ${e.spacing["spacing-l"]}`:e.spacing["spacing-l"])};
  margin-bottom: ${({theme:e,marginBottom:t})=>t||e.spacing["spacing-l"]};
  ${({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}})=>l.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,u=(0,i.A)(r.A,{shouldForwardProp:e=>!["marginBottom","margin","flex","padding","nested","background"].includes(e)})`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||l.Ay[n===d.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  margin-bottom: ${({theme:e,marginBottom:t})=>t||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,theme:{themeName:t}})=>e||l.Ay[t===d.S.DARK?"desktop-color-neutral-01-dark":"desktop-color-neutral-00-light"]};
      height: 48px;
      padding: 0 ${c.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0 ${c.Ln} ${c.Ln};
      > div {
        padding: 0;
      }
    }
  }
`,E=({type:e,marginBottom:t,margin:n,padding:l,flex:r,width:i,nested:d,...c})=>"items"in c?o.createElement(u,{marginBottom:t,margin:n,padding:l,flex:r,nested:d,...c}):o.createElement(m,{nested:d,width:i,marginBottom:t,margin:n,padding:l,flex:r,isButtonList:e===a.BUTTON_LIST,...c},c.children)}}]);