1import{n as y,r as c,j as e,V as n,U as r,_ as x}from"./client-CW2TRXQx.js";import{E as i}from"./EditableText-CKuXT_qT.js";import{u as p}from"./usePostEditor-ClCzBRjj.js";import{T as f}from"./TicketingLink-CEMkxr-7.js";function h(a){const o=y("location")[0],d=a.event?.eventMeta?.ticketing,[m,s]=c.useState(null);return c.useEffect(()=>{const t=a.event?.eventMeta?.when;if(t?.shortDateOverride){s(t.shortDateOverride);return}if(t?.dateType==="single"&&t?.date&&s(e.jsx(e.Fragment,{children:n(r(t.date,"d/LL/yyyy",new Date),"E d LLL yyyy")})),t?.dateType==="repeating"&&t?.startDate&&t?.endDate&&s(e.jsxs(e.Fragment,{children:[n(r(t.startDate,"d/LL/yyyy",new Date),"d LLL")," â"," ",n(r(t.endDate,"d/LL/yyyy",new Date),"d LLL"),t.days&&e.jsxs(e.Fragment,{children:["Â (",t?.days?.join(", ").replace("sunday","Sun").replace("monday","Mon").replace("tuesday","Tue").replace("wednesday","Wed").replace("thursday","Thu").replace("friday","Fri").replace("saturday","Sat"),")"]})]})),t?.dateType==="selection"){const l=x(t.dateSelection);l?.[0]?.date&&s(e.jsxs(e.Fragment,{children:["Next: ",n(r(l[0].date,"d/LL/yyyy",new Date),"E d LLL yyyy"),l.length!==1&&e.jsxs(e.Fragment,{children:["Â (",l.length-1," more times)"]})]}))}},[a.event]),e.jsx("div",{className:"title w-full overflow-hidden pt-10 pb-4",children:e.jsx("div",{className:"grid-auto",children:e.jsxs("div",{className:"col-span-12 flex flex-col gap-2",children:[e.jsx(i,{as:"h1",className:"type-title-xl-comp",store:p(a.event?.title),placeholder:"Enter title...",disableLineBreaks:!0}),e.jsx(i,{as:"h2",store:"subtitle",className:"!type-title-m !normal-case !my-0",placeholder:"Enter subtitle...",disableLineBreaks:!0}),e.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-x-6 type-title-s pt-8 flex-wrap",children:[d?.link&&e.jsx(f,{href:d.link,label:a.event?.title,type:"event",id:a.event?.databaseId}),e.jsxs("div",{className:"flex flex-col items-start md:flex-row md:items-center flex-wrap gap-x-2",children:[m,o?.includes("<a href=")&&e.jsxs("div",{className:"flex items-center gap-x-2",children:[e.jsx("span",{children:"at"}),e.jsx(i,{as:"span",store:"location",className:"type-title-s flex items-center gap-1 underline hover:text-pink",placeholder:"Enter location and add google map link.",disableLineBreaks:!0})]})]})]})]})})})}h.displayName="Block(events/event-header)";export{h as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.