import{bI as x,bK as L,az as D,h as c,ao as t,aF as f,bk as j,L as u,bG as C,bU as r}from"./app-k0jcl5PQ.js";import{S as E}from"./3RdkFL8E.chunk.js";import{C as H}from"./DwhL38Dt.chunk.js";import{S as d}from"./BC-7kXnm.chunk.js";import"./Cukd0Qmt.chunk.js";import"./DoGfHyrk.chunk.js";const P="_modalWidth_t2uj7_1",S="_buttons_t2uj7_6",p={modalWidth:P,buttons:S},m="specialEventCalendar.eventListPopup",_=u.encloseNamespace(m),A=400,M=300;function O(a){const{activePresentation:e}=x(),{availablePresentations:b}=L(),o=new Date(a.from),h=new Date(a.to),i=D((e==null?void 0:e.id)&&H.calendarEvents(c.format(o,"YYYY-MM-DD"),c.format(h,"YYYY-MM-DD"),e.id)),g=new Date(a.date),v=d.getAllEventsForDate(g,i.data||[],o);return e!=null&&e.id?t.jsxs(f,{title:`Events on ${d.getOrdinalDate(a.date)}`,closePopup:a.closePopup,dialogClassName:p.modalWidth,bodyClassName:"p-0",showLoadingSpinner:!i.data,children:[t.jsx(j.Scrollbars,{autoHeight:!0,autoHeightMin:M,autoHeightMax:A,children:t.jsx("div",{className:"px-3 pt-2",children:v.map(l=>t.jsx(E,{getAppLink:(n,s)=>C.getAppLink({...n,name:s},void 0,b),event:l,onClick:a.closePopup,inPopup:!0,presentationId:e.id,getActionLabel:()=>_("buttonLabel"),getBannerUrl:n=>{var s;return(s=n.banner)==null?void 0:s.url}},l.content.id))})}),t.jsx("div",{className:"ms-3",children:t.jsx(r,{className:p.buttons,children:t.jsx(r.Cancel,{variant:"outline-dark",className:"mb-3",onClick:a.closePopup,text:u.getPhrase(m,"close")})})})]}):t.jsx(t.Fragment,{})}export{O as SpecialEventListView};
//# sourceMappingURL=DA7kt4JR.chunk.js.map
