"use strict";(self.webpackChunkflow_web_extension=self.webpackChunkflow_web_extension||[]).push([["20115"],{721325:function(e,t,a){var r=a(923671),n=a(168716),l=a(508851);t.Z=function(e,t,a){void 0===a&&(a={});var c=(0,r.Z)(t);(0,l.Z)(function(){var t=(0,n.n)(a.target,window);if(null==t?void 0:t.addEventListener){var r=function(e){return c.current(e)};return t.addEventListener(e,r,{capture:a.capture,once:a.once,passive:a.passive}),function(){t.removeEventListener(e,r,{capture:a.capture})}}},[e,a.capture,a.once,a.passive],a.target)}},571399:function(e,t,a){a.d(t,{S0:()=>i});var r=a(837222),n=a(531484),l=a(698127),c=a(706790),o=a(497176),s={batchDownloadSelected:!1,isAllSelectChecked:!1,selectedImageUrlWithMessageList:[]},i=(0,n.Ue)()((0,r.XR)((e,t)=>(0,c._)((0,l._)({},s),{onUpdateBatchDownloadSelected:t=>{e((0,o.Uy)(e=>{e.batchDownloadSelected=t}))},onUpdateAllSelectChecked:t=>{e((0,o.Uy)(e=>{e.isAllSelectChecked=t}))},toggleImageUrl:(a,r)=>{var n=t().selectedImageUrlWithMessageList;e({selectedImageUrlWithMessageList:n.map(e=>e.url).includes(a)?n.filter(e=>e.url!==a):[...n,{url:a,message:r}]})},clearSelectedImageUrl:()=>{e((0,o.Uy)(e=>{e.selectedImageUrlWithMessageList=[]}))},checkAllImage:t=>{e((0,o.Uy)(e=>{e.selectedImageUrlWithMessageList=t}))}})))},56038:function(e,t,a){a.r(t),a.d(t,{BatchDownloadChatHeaderPlugin:()=>b});var r=a(397458);a(652983);var n=a(233434),l=a(87608),c=a.n(l),o=a(571399),s=a(932842),i=a(788704),d=a(221330),h=a(956954),u=a(721325),v=a(727766),g={"header-container":"header-container-XxXHyh",headerContainer:"header-container-XxXHyh",title:"title-oUXSNd"},p=()=>{var e=(0,d.g1)(),t=(0,h.PG)(),[a,l,p,m]=(0,o.S0)(e=>[e.onUpdateBatchDownloadSelected,e.clearSelectedImageUrl,e.isAllSelectChecked,e.onUpdateAllSelectChecked],n.Z),b=()=>{var e;l(),a(!1),null===(e=(0,s.GX)("chatMessageBoxLayoutStore"))||void 0===e||e.getLayoutSetter().setLayoutAreaVisible("bottom"),p&&m(!1),(0,i.L)("multi_download_button_click",{content_type:"pic",button_name:"cancel"})};return(0,u.Z)("keydown",e=>{"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),null==b||b())}),(0,r.jsx)("div",{className:"border-solid border-transparent border-b-[0.5px] border-b-s-color-border-secondary",children:(0,r.jsx)(v.bo.MaxWidthLayout,{containerClassName:g["select-mode"],centerContentMaxWidthDelta:32,children:(0,r.jsxs)("div",{className:g["header-container"],children:[(0,r.jsx)("div",{className:g.title,children:e("image_download_header_batch")}),(0,r.jsx)("div",{onClick:b,className:c()("s-font-small absolute right-0 text-s-color-text-tertiary cursor-pointer",{"mr-18":!t}),children:e("cancel")})]})})})},m=e=>{var{conversationId:t}=e;return(0,r.jsx)(p,{conversationId:t})};class b{constructor(){this.Content=m}}}}]);
//# sourceMappingURL=20115.js.map