1import{j as a,L as l,s as n}from"./index-YI259czl.js";import{a as c}from"./format-7Mkui-Kk.js";import{S as o}from"./star-DRa2UmrS.js";import{U as d}from"./users-BkKc9inG.js";import{u as i}from"./useQuery-DElbLCIL.js";function h(e){const r=e.base_price_type&&e.base_price_type!=="per_person"?"/ Buchung":"/ Person",s=e.category?e.categoryLabels?.[e.category]??e.category:null,t=e.index!==void 0&&e.index<3;return a.jsxs(l,{to:"/event/$id",params:{id:e.slug??e.id},className:"group block bg-card rounded-2xl overflow-hidden border border-border hover:shadow-lg transition-all",children:[a.jsxs("div",{className:"relative aspect-[4/3] bg-secondary overflow-hidden",children:[e.cover_image?a.jsx("img",{src:e.cover_image,alt:e.name,loading:t?void 0:"lazy",fetchPriority:t?"high":void 0,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}):a.jsx("div",{className:"w-full h-full grid place-items-center text-muted-foreground text-xs",children:"Kein Bild"}),s&&a.jsx("span",{className:"absolute top-3 left-3 bg-background/90 backdrop-blur px-2 py-1 rounded-md text-[10px] font-bold uppercase tracking-widest text-accent",children:s})]}),a.jsxs("div",{className:"p-5",children:[a.jsxs("div",{className:"flex justify-between items-start gap-2 mb-2",children:[a.jsx("h3",{className:"font-bold leading-tight group-hover:text-accent transition-colors",children:e.name}),e.rating!=null&&e.rating>0&&a.jsxs("div",{className:"flex items-center gap-1 text-sm font-bold shrink-0",children:[a.jsx(o,{className:"h-4 w-4 fill-warning text-warning"}),e.rating.toFixed(1)]})]}),a.jsxs("p",{className:"text-sm text-muted-foreground mb-3 flex items-center gap-2",children:[a.jsx("span",{children:e.city}),e.max_guests&&a.jsxs(a.Fragment,{children:[a.jsx("span",{children:"â¢"}),a.jsxs("span",{className:"inline-flex items-center gap-1",children:[a.jsx(d,{className:"h-3 w-3"})," bis ",e.max_guests]})]})]}),a.jsxs("div",{className:"pt-3 border-t border-border flex justify-between items-end",children:[a.jsxs("div",{children:[a.jsx("span",{className:"text-xs text-muted-foreground",children:"ab"}),a.jsxs("p",{className:"text-lg font-bold",children:[c(e.base_price_per_person)," ",a.jsx("span",{className:"text-xs font-normal text-muted-foreground",children:r})]})]}),e.tags&&e.tags.length>0&&a.jsx("span",{className:"text-[10px] font-medium text-muted-foreground bg-secondary px-2 py-1 rounded-full",children:e.tagLabels?.[e.tags[0]]??e.tags[0]})]})]})]})}function b(){return i({queryKey:["all-tags-active"],queryFn:async()=>{const{data:e,error:r}=await n.from("tags").select("slug, name").eq("is_active",!0);if(r)throw r;const s={};for(const t of e??[])t.slug&&t.name&&(s[t.slug]=t.name);return s}})}function j(){return i({queryKey:["all-categories-active"],queryFn:async()=>{const{data:e,error:r}=await n.from("event_categories").select("slug, name").eq("is_active",!0);if(r)throw r;const s={};for(const t of e??[])t.slug&&t.name&&(s[t.slug]=t.name);return s}})}export{h as L,j as a,b as u};
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.