import{ao as n,T as w,bV as D,p as g,E as N,r as S,h as u,ba as T,bW as L,a_ as E,aq as _,bX as I,bY as A,o as H}from"./app-k0jcl5PQ.js";import{L as $}from"./Cukd0Qmt.chunk.js";import{C as z}from"./DoGfHyrk.chunk.js";import{S as U}from"./BC-7kXnm.chunk.js";function B(e){return n.jsx("svg",{...e,children:n.jsx("path",{fill:"currentColor",d:"M9.2 6h5.6V4.6a.6.6 0 1 1 1.2 0V6h2a1 1 0 0 1 1 1v11a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V7a1 1 0 0 1 1-1h2V4.6a.6.6 0 0 1 1.2 0zm8.8 5H6v7a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1zm-3.2 1.976a.51.51 0 0 0-.046-.706.477.477 0 0 0-.686.047l-3.063 3.598-1.092-1.122a.477.477 0 0 0-.688 0 .51.51 0 0 0 0 .707l1.46 1.5a.48.48 0 0 0 .71-.024z"})})}const M="_banner_1p617_5",P="_pill_1p617_10",V="_logo_1p617_13",i={banner:M,pill:P,logo:V},Y="shared.specialEventListItem";function q(e){return"audiences"in e&&"endDateTime"in e&&"startDateTime"in e}function F(e){var o,m,r,v,x,h,b;const f=e.getAppLink(e.event.content,w.slugify(e.event.name)),j=(o=e.getBackgroundColor)==null?void 0:o.call(e,e.event.content),l=(m=e.getIconUrl)==null?void 0:m.call(e,e.event.content),k=(r=e.getBannerUrl)==null?void 0:r.call(e,e.event.content),y=!!e.event.endDate,t=e.event.content.status===D.ComingSoon,c=(v=e.getStartTime)==null?void 0:v.call(e,e.event.content),C=(x=e.getActionLabel)==null?void 0:x.call(e),a=(h=e.isPastEvent)==null?void 0:h.call(e,e.event.content),s={actionType:S.Click,entity:N.SpecialEvent,location:e.inPopup?g.CalendarPopup:g.CalendarDay},d={topicId:e.event.content.id,eventId:e.event.specialEventId,presentationId:e.presentationId,date:u.format(new Date(e.event.startDate),"YYYY-MM-DD"),status:e.event.content.status};return n.jsxs("div",{children:[c&&n.jsx("h6",{children:c}),n.jsxs("div",{onClick:()=>{t&&H.logUserAction(d,s)},children:[n.jsx(T,{appLink:!t&&f,className:`${t?"":"cursor-pointer"} text-decoration-none mb-2`,onClick:e.onClick,analyticsOptions:s,analyticsData:d,children:n.jsxs("div",{className:`banner rounded-3 position-relative position-relative ${i.banner}`,style:{backgroundColor:j,backgroundImage:`url('${k}')`},children:[a&&n.jsx("div",{className:"bg-white w-100 h-100 opacity-50 position-absolute top-0 left-0 z-0"}),n.jsxs("div",{className:"d-flex justify-content-between align-items-center w-100 h-100 px-3",children:[n.jsxs("div",{className:"d-flex align-items-center z-1",children:[l&&n.jsx("div",{className:`${i.logo} rounded-circle flex-shrink-0 overflow-hidden me-2`,children:n.jsx(L,{data:l})}),n.jsxs("div",{children:[t&&n.jsx(z,{className:`pe-2 fw-semibold mb-1 rounded-pill justify-content-start ${i.pill}`}),a&&n.jsxs("div",{className:"d-inline-block rounded-pill bg-light-green mb-1",children:[n.jsx(E,{svg:B}),n.jsx("p",{className:"d-inline ms-1 mb-0",children:n.jsx(_,{namespace:Y,phrase:"pastEvent"})})]}),y&&n.jsx("p",{className:"text-white text-shadow mb-1",children:U.getDisplayDate(e.event.startDate,e.event.endDate)}),n.jsx("h2",{className:`h4 text-white text-shadow ${e.event.description?"clamp-2":"clamp-1"}`,title:e.event.name,children:e.event.name})]})]}),n.jsx("div",{className:"d-none d-sm-block flex-shrink-0 z-1",children:!t&&n.jsx(I,{className:`btn ${a?"btn-outline-dark":"btn-dark"} fw-semibold`,children:C})})]})]})}),n.jsx("div",{className:"pre-wrap text-break mb-3",dangerouslySetInnerHTML:{__html:$.linkifyText(e.event.description||e.event.content.description)}}),q(e.event.content)&&n.jsxs("div",{className:"d-flex mb-3",children:[n.jsx("div",{className:"rounded-pill border border-dark px-2 bg-white d-inline-block me-2",children:(b=A.getMergedPresentationAudienceString(e.event.content.audiences))==null?void 0:b.name}),n.jsx("div",{className:"rounded-pill fw-semibold bg-dark text-white d-inline-block px-2",children:`${u.diffBetween(e.event.content.endDateTime,e.event.content.startDateTime,"minutes")}m`})]})]})]})}export{F as S};
//# sourceMappingURL=3RdkFL8E.chunk.js.map
