1import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{t}from"./react-C21x__mS.js";import{t as n}from"./jsx-runtime-BdxMnOeJ.js";import{t as r}from"./router-compat-D-RDzRaH.js";import{t as i}from"./proxy-DJVebW72.js";import{t as a}from"./arrow-right-CI0vHzEp.js";import{t as o}from"./book-open-Cuc74ahK.js";import{t as s}from"./search-B76OCwiY.js";import{t as c}from"./x-Co3ql2F6.js";import{n as l}from"./blog-client-2CBBdhbB.js";import{t as u}from"./skeleton-D2cDHCa-.js";import{t as d}from"./badge-C5dJTeG8.js";import{t as f}from"./useSEO-kS-bIoJ-.js";import{t as p}from"./BookingCTA-DnmjkERH.js";import{i as m,n as h,r as g,t as _}from"./blog-categories-D-cNXG2v.js";var v=e(t(),1),y=n();function b(e){return e?new Date(e).toLocaleDateString(`de-DE`,{day:`numeric`,month:`long`,year:`numeric`}):``}var x={hidden:{opacity:0,y:30},visible:{opacity:1,y:0,transition:{duration:.5}}},S=()=>{f({title:`Blog â Tipps & Neuigkeiten`,description:`Tipps, Wissen und Neuigkeiten rund um Sehen & Hören.`});let[e,t]=(0,v.useState)([]),[n,S]=(0,v.useState)(!0),[C,w]=(0,v.useState)(`alle`),[T,E]=(0,v.useState)(``);(0,v.useEffect)(()=>{S(!0),l().then(t).catch(console.error).finally(()=>S(!1))},[]);let D=(0,v.useMemo)(()=>e.map(e=>({post:e,category:g(e)})),[e]),O=(0,v.useMemo)(()=>{let e={alle:D.length};for(let{category:t}of D)e[t]=(e[t]??0)+1;return e},[D]),k=(0,v.useMemo)(()=>{let e=T.trim().toLowerCase();return D.filter(({post:t,category:n})=>C!==`alle`&&n!==C?!1:!e||t.title.toLowerCase().includes(e)||(t.excerpt??``).toLowerCase().includes(e))},[D,C,T]);return(0,y.jsxs)(`div`,{className:`min-h-screen`,children:[(0,y.jsx)(`section`,{className:`bg-gradient-to-br from-primary/5 via-background to-gronde-cream/30 py-16 md:py-24`,children:(0,y.jsx)(`div`,{className:`container`,children:(0,y.jsxs)(i.div,{initial:`hidden`,animate:`visible`,variants:x,children:[(0,y.jsx)(`h1`,{className:`font-display text-4xl md:text-5xl font-bold mb-4`,children:`Aus dem Blog`}),(0,y.jsx)(`p`,{className:`text-lg text-muted-foreground max-w-2xl`,children:`Tipps, Wissen und Neuigkeiten rund um Sehen & Hören`})]})})}),(0,y.jsx)(`section`,{className:`border-b border-border/50 sticky top-[var(--header-offset,4rem)] bg-background/95 backdrop-blur-sm z-10`,children:(0,y.jsx)(`div`,{className:`container py-3`,children:(0,y.jsxs)(`div`,{className:`flex flex-col md:flex-row md:items-center gap-3`,children:[(0,y.jsx)(`div`,{className:`flex gap-1.5 overflow-x-auto -mx-4 px-4 md:mx-0 md:px-0 md:flex-1`,children:_.map(e=>{let t=C===e.value,n=O[e.value]??0;return(0,y.jsx)(`button`,{onClick:()=>w(e.value),className:`px-5 py-2.5 min-h-[44px] rounded-2xl text-sm font-medium whitespace-nowrap transition-all inline-flex items-center justify-center min-w-[80px] ${t?`bg-primary text-primary-foreground shadow-sm`:`text-muted-foreground hover:bg-muted border border-transparent hover:border-border/50`}`,children:(0,y.jsxs)(`span`,{className:`flex flex-col items-center leading-tight`,children:[(0,y.jsx)(`span`,{children:e.label}),(0,y.jsx)(`span`,{className:`text-[10px] tabular-nums font-normal ${t?`text-primary-foreground/70`:`text-muted-foreground`}`,children:n})]})},e.value)})}),(0,y.jsxs)(`div`,{className:`relative md:w-72 shrink-0`,children:[(0,y.jsx)(s,{className:`h-4 w-4 absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground`,"aria-hidden":`true`}),(0,y.jsx)(`input`,{type:`search`,value:T,onChange:e=>E(e.target.value),placeholder:`Beiträge durchsuchen...`,className:`w-full h-10 pl-9 pr-9 rounded-full border border-border/60 bg-background text-sm focus:outline-hidden focus:ring-2 focus:ring-ring focus:border-transparent`,"aria-label":`Beiträge durchsuchen`}),T&&(0,y.jsx)(`button`,{onClick:()=>E(``),className:`absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded-full text-muted-foreground hover:bg-muted`,"aria-label":`Suche zurücksetzen`,children:(0,y.jsx)(c,{className:`h-3.5 w-3.5`})})]})]})})}),(0,y.jsx)(`section`,{className:`py-12 md:py-16`,children:(0,y.jsxs)(`div`,{className:`container`,children:[!n&&(0,y.jsxs)(`div`,{className:`mb-6 text-sm text-muted-foreground`,children:[k.length,` `,k.length===1?`Beitrag`:`Beiträge`,C!==`alle`&&(0,y.jsxs)(y.Fragment,{children:[` in `,(0,y.jsx)(`span`,{className:`text-foreground font-medium`,children:m(C)})]}),T&&(0,y.jsxs)(y.Fragment,{children:[` für â`,T,`"`]})]}),n?(0,y.jsx)(`div`,{className:`grid md:grid-cols-2 lg:grid-cols-3 gap-6`,children:[...[,,,,,,]].map((e,t)=>(0,y.jsxs)(`div`,{className:`rounded-2xl border border-border/50 overflow-hidden`,children:[(0,y.jsx)(u,{className:`aspect-[16/9] w-full`}),(0,y.jsxs)(`div`,{className:`p-5 space-y-3`,children:[(0,y.jsx)(u,{className:`h-4 w-24`}),(0,y.jsx)(u,{className:`h-6 w-full`}),(0,y.jsx)(u,{className:`h-4 w-3/4`})]})]},t))}):k.length===0?(0,y.jsxs)(`div`,{className:`text-center py-20`,children:[(0,y.jsx)(o,{"aria-hidden":`true`,className:`h-12 w-12 text-muted-foreground
1/60 mx-auto mb-4`}),(0,y.jsx)(`h2`,{className:`font-display text-xl mb-2`,children:`Keine Beiträge gefunden`}),(0,y.jsx)(`p`,{className:`text-muted-foreground mb-6`,children:`Versuche eine andere Kategorie oder einen anderen Suchbegriff.`}),(0,y.jsx)(`button`,{onClick:()=>{w(`alle`),E(``)},className:`text-sm font-medium text-primary hover:underline`,children:`Filter zurücksetzen`})]}):(0,y.jsx)(i.div,{initial:`hidden`,animate:`visible`,variants:{visible:{transition:{staggerChildren:.06}}},className:`grid md:grid-cols-2 lg:grid-cols-3 gap-6`,children:k.map(({post:e,category:t})=>(0,y.jsx)(i.div,{variants:x,children:(0,y.jsxs)(r,{to:`/blog/${e.slug}`,className:`block h-full rounded-2xl border border-border/50 overflow-hidden bg-card hover:shadow-md transition-all hover:-translate-y-1 group`,children:[e.cover_image_url?(0,y.jsx)(`img`,{src:e.cover_image_url,alt:e.title,className:`aspect-[16/9] w-full object-cover`,loading:`lazy`}):(0,y.jsx)(`div`,{className:`aspect-[16/9] bg-gradient-to-br from-primary/10 via-gronde-gold/5 to-gronde-cream flex items-center justify-center`,children:(0,y.jsx)(o,{className:`h-10 w-10 text-primary/15`})}),(0,y.jsxs)(`div`,{className:`p-5`,children:[(0,y.jsxs)(`div`,{className:`flex items-center gap-2 mb-2 flex-wrap`,children:[(0,y.jsx)(d,{variant:`outline`,className:`text-[11px] ${h[t]}`,children:m(t)}),(0,y.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:b(e.published_at)})]}),(0,y.jsx)(`h3`,{className:`font-display text-lg font-bold mb-2 group-hover:text-primary transition-colors line-clamp-2`,children:e.title}),e.excerpt&&(0,y.jsx)(`p`,{className:`text-sm text-muted-foreground leading-relaxed line-clamp-3`,children:e.excerpt}),(0,y.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-sm font-semibold text-primary mt-3 group-hover:gap-2 transition-all`,children:[`Weiterlesen `,(0,y.jsx)(a,{className:`h-3.5 w-3.5`})]})]})]})},e.id))})]})}),(0,y.jsx)(p,{})]})};export{S as component};
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.