1import{u as e,j as s,L as a}from"./vendor-react-BH6F5oQJ.js";import{l as r,w as l,S as i,f as n,H as t,C as o,m as c}from"./index-C_oSc_qP.js";import{D as d,a as m,b as x,c as h,d as p,e as j}from"./dropdown-menu-YTVGj1XK.js";import{g,S as f,c as u}from"./socialSharing-lIC7LEty.js";import{c as N,E as v,D as w,f as b,g as y,h as C,i as _,j as k,k as $,l as P,Q as L}from"./vendor-icons-CaI5__By.js";import"./vendor-ui-B4WC06Sp.js";import"./vendor-query-CC4VRGyP.js";import"./vendor-supabase-COwyE4EW.js";import"./index-D5Ei2fSx.js";import"./Combination-DzDAyqvK.js";const E="https://delphigrc.org",S=()=>{const{id:S}=e(),{data:R,isLoading:A}=r(S),{toast:D}=l(),I=R?`${E}/events/${R.slug||R.id}/program`:`${E}/events`,B=`https://api.qrserver.com/v1/create-qr-code/?size=280x280&data=${encodeURIComponent(I)}`,O=()=>({url:I,title:R?`${R.title} â Program`:"Event program",description:(null==R?void 0:R.description)||"Program page"});if(A)return s.jsx("div",{className:"min-h-screen bg-background",children:s.jsx("main",{className:"container py-16",children:s.jsxs("div",{className:"mx-auto max-w-5xl space-y-4",children:[s.jsx(i,{className:"h-8 w-40"}),s.jsx(i,{className:"h-96 w-full"})]})})});if(!R)return s.jsx("div",{className:"min-h-screen bg-background",children:s.jsx("main",{className:"container py-16",children:s.jsxs("div",{className:"mx-auto max-w-2xl text-center space-y-4",children:[s.jsx("p",{className:"text-muted-foreground",children:"Event not found."}),s.jsx(n,{asChild:!0,variant:"outline",children:s.jsxs(a,{to:"/events",children:[s.jsx(N,{className:"mr-2 h-4 w-4"}),"Back to events"]})})]})})});if(!R.program_file_url)return s.jsx("div",{className:"min-h-screen bg-background",children:s.jsx("main",{className:"container py-16",children:s.jsxs("div",{className:"mx-auto max-w-2xl text-center space-y-4",children:[s.jsx("p",{className:"text-muted-foreground",children:"Program file is not available for this event."}),s.jsx(n,{asChild:!0,variant:"outline",children:s.jsxs(a,{to:`/events/${R.slug||R.id}`,children:[s.jsx(N,{className:"mr-2 h-4 w-4"}),"Back to event"]})})]})})});const W=R.program_file_url.toLowerCase(),q=W.endsWith(".pdf"),F=[".png",".jpg",".jpeg"].some(e=>W.endsWith(e));return s.jsxs(s.Fragment,{children:[s.jsxs(t,{children:[s.jsx("title",{children:`${R.title} Program | Delphi Global Research Center`}),s.jsx("meta",{name:"description",content:`Program page for ${R.title}.`}),s.jsx("meta",{property:"og:type",content:"website"}),s.jsx("meta",{property:"og:title",content:`${R.title} Program`}),s.jsx("meta",{property:"og:description",content:`Program page for ${R.title}.`}),s.jsx("meta",{property:"og:url",content:I}),s.jsx("link",{rel:"canonical",href:I})]}),s.jsx("div",{className:"min-h-screen bg-background",children:s.jsx("main",{className:"container py-10",children:s.jsxs("div",{className:"mx-auto max-w-6xl space-y-6",children:[s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[s.jsx(n,{asChild:!0,variant:"outline",children:s.jsxs(a,{to:`/events/${R.slug||R.id}`,children:[s.jsx(N,{className:"mr-2 h-4 w-4"}),"Back to event"]})}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(n,{asChild:!0,variant:"outline",children:s.jsxs("a",{href:R.program_file_url,target:"_blank",rel:"noopener noreferrer",children:[s.jsx(v,{className:"mr-2 h-4 w-4"}),"Open original file"]})}),s.jsx(n,{asChild:!0,children:s.jsxs("a",{href:R.program_file_url,download:!0,children:[s.jsx(w,{className:"mr-2 h-4 w-4"}),"Download"]})})]})]}),s.jsxs("h1",{className:"font-heading text-3xl font-bold",children:[R.title," â Program"]}),s.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1fr_300px]",children:[s.jsx(o,{className:"overflow-hidden",children:s.jsx(c,{className:"p-0",children:q?s.jsx("iframe",{src:R.program_file_url,title:`${R.title} program`,className:"h-[78vh] w-full border-0"}):F?s.jsx("div",{className:"bg-muted p-4",children:s.jsx("img",{src:R.program_file_url,alt:`${R.title} program`,className:"mx-auto h-auto max-h-[78vh] w-auto max-w-full object-contain"})}):s.jsxs("div",{className:"p-8 text-center",children:[s.jsx("p",{className:"text-muted-foreground mb-4",children:"Preview is not available for this file type."}),s.jsx(n,{asChild:!0,children:s.jsx("a",{href:R.program_file_url,target:"_blank",rel:"noopener noreferrer",children:"Open file"})})]})})}),s.jsx(o,{children:s.jsxs(c,{className:"space-y-4 p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[s.jsx(b,{className:"h-4 w-4"}),"Share program page"]}),s.jsxs(d,{children:[s.jsx(m,{asChild:!0,children:s.jsxs(n,{variant:"outline",className:"w-full justify-start",children:[s.jsx(b,{className:"mr-2 h-4 w-4"}),"Share"]})}),s.jsxs(x,{align:"start",className:"w-56",children:[s.jsx(h,{children:"Share this program page"}),s.jsx(p,{}),s.jsx(j,{asChild:!0,children:s.jsxs("a",{href:g(f.FACEBOOK,O()),target:"_blank",rel:"noopener noreferrer",children:[s.jsx(y,{className:"mr-2 h-4 w-4"}),"Facebook"]})}),s.jsx(j,{asChild:!0,children:s.jsxs("a",{href:g(f.LINKEDIN,O()),target:"_blank",rel:"noopener noreferrer",children:[s.jsx(C,{className:"mr-2 h-4 w-4"}),"LinkedIn"]})}),s.jsx(j,{asChild:!0,children:s.jsxs("a",{href:g(f.WHATSAPP,O()),target:"_blank",rel:"noopener noreferrer",children:[s.jsx(_,{className:"mr-2 h-4 w-4"}),"WhatsApp"]})}),s.jsx(j,{asChild:!0,children:s.jsxs("a",{href:g(f.TELEGRAM,O()),target:"_blank",rel:"noopener noreferrer",children:[s.jsx(k,{className:"mr-2 h-4 w-4"}),"Telegram"]})}),s.jsx(j,{asChild:!0,children:s.jsxs("a",{href:g(f.EMAIL,O()),children:[s.jsx($,{className:"mr-2 h-4 w-4"}),"Email"]})}),s.jsx(p,{}),s.jsxs(j,{onClick:async()=>{await u(I)?D({title:"Link copied",description:"Program page URL copied to clipboard."}):D({title:"Copy failed",description:"Could not copy URL to clipboard.",variant:"destructive"})},children:[s.jsx(P,{className:"mr-2 h-4 w-4"}),"Copy link"]})]})]}),s.jsxs("div",{className:"pt-2 border-t space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[s.jsx(L,{className:"h-4 w-4"}),"QR code"]}),s.jsx("img",{src:B,alt:`QR code for ${R.title} program page`,className:"h-[220px] w-[220px] rounded border"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Scan to open this program page."})]})]})})]})]})})})]})};export{S 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.