1import{j as e}from"./react-vendor-DgF5BvPh.js";import{u as m,ag as x,aW as u,A as h,$ as o,n as i,aX as g,v as p}from"./index-DR1xWILk.js";import{S as t}from"./skeleton-DdA3Tef6.js";import{C as f}from"./CollectionSchema-D17bxwlG.js";import"./ui-vendor-DLQD4Y5c.js";import"./router-CYXz2GUs.js";const _=()=>{const{data:s,isLoading:d,error:c}=m({queryKey:["annual-reports"],queryFn:async()=>{const{data:r,error:l}=await p.from("annual_reports").select("*").order("report_year",{ascending:!1});if(l)throw l;return r}}),a=(s==null?void 0:s.find(r=>r.is_latest))||(s==null?void 0:s[0]),n=s==null?void 0:s.filter(r=>r.id!==(a==null?void 0:a.id));return e.jsxs("div",{className:"min-h-screen flex flex-col",children:[e.jsx(x,{title:"Annual Reports | GS1 New Zealand",description:"Browse GS1 New Zealand's annual reports, documenting our progress, achievements, and impact on New Zealand's supply chain community."}),e.jsx(f,{path:"/annual-reports",name:"GS1 New Zealand annual reports",description:"GS1 New Zealand's annual reports documenting our progress, achievements and impact on New Zealand's supply chain community."}),e.jsx(u,{}),e.jsxs("main",{className:"flex-grow",children:[e.jsx("section",{className:"bg-primary text-primary-foreground py-16 md:py-24",children:e.jsx("div",{className:"container mx-auto px-4",children:e.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-8 md:gap-12",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("h1",{className:"text-4xl md:text-5xl font-heading font-bold mb-4",children:"Annual Reports"}),e.jsx("p",{className:"text-lg md:text-xl text-primary-foreground/80 mb-6 max-w-lg",children:"Our annual reports document the progress, achievements, and impact of GS1 New Zealand."}),(a==null?void 0:a.pdf_url)&&e.jsxs("a",{href:a.pdf_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 bg-white/15 hover:bg-white/25 backdrop-blur-sm text-primary-foreground px-6 py-3 rounded-lg font-medium transition-colors",children:["View the ",a.report_year," Report",e.jsx(h,{className:"h-4 w-4"})]})]}),(a==null?void 0:a.hero_image)&&e.jsx("a",{href:a.pdf_url||void 0,target:"_blank",rel:"noopener noreferrer",className:"shrink-0 group",children:e.jsx("div",{className:"w-48 md:w-56 rounded-lg overflow-hidden shadow-2xl ring-1 ring-white/20 group-hover:ring-white/40 transition-all group-hover:scale-[1.02]",children:e.jsx(o,{src:a.hero_image,alt:`GS1 New Zealand ${a.title} cover`,className:"w-full h-auto"})})})]})})}),e.jsx("section",{className:"py-12",children:e.jsxs("div",{className:"container mx-auto px-4",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold mb-6",children:"Previous reports"}),d?e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 gap-4",children:[...Array(8)].map((r,l)=>e.jsxs("div",{className:"bg-card rounded-lg overflow-hidden shadow-sm",children:[e.jsx(t,{className:"aspect-[3/4] w-full"}),e.jsx("div",{className:"p-2 space-y-1",children:e.jsx(t,{className:"h-4 w-3/4 mx-auto"})})]},l))}):c?e.jsx("div",{className:"text-center py-12",children:e.jsx("p",{className:"text-destructive",children:"Error loading annual reports. Please try again later."})}):n&&n.length>0?e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 gap-4",children:n.map(r=>e.jsxs("a",{href:r.pdf_url||void 0,target:"_blank",rel:"noopener noreferrer",className:`block bg-card rounded-lg overflow-hidden shadow-sm hover:shadow-lg transition-all group ${r.pdf_url?"cursor-pointer":"cursor-default opacity-60"}`,children:[e.jsx("div",{className:"aspect-[3/4] relative overflow-hidden bg-muted",children:r.hero_image?e.jsx(o,{src:r.hero_image,alt:`GS1 New Zealand ${r.title} cover`,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center",children:e.jsx(i,{className:"w-10 h-10 text-muted-foreground"})})}),e.jsx("div",{className:"p-3 text-center",children:e.jsxs("h3",{className:"font-medium text-sm text-foreground",children:[r.report_year," Annual Report"]})})]},r.id))}):e.jsxs("div",{className:"text-center py-12",children:[e.jsx(i,{className:"w-16 h-16 mx-auto text-muted-foreground mb-4"}),e.jsx("p",{className:"text-muted-foreground text-lg",children:"No annual reports available yet."})]})]})})]}),e.jsx(g,{})]})};export{_ 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.