import { e as createComponent, m as maybeRenderHead, g as addAttribute, r as renderTemplate, k as renderComponent, u as unescapeHTML } from '../chunks/astro/server_DePCulMI.mjs';
import 'piccolore';
import { $ as $$Layout } from '../chunks/Layout_DxAv3UTa.mjs';
import { $ as $$ProductCard } from '../chunks/ProductCard_7e_PI4fu.mjs';
import 'clsx';
import { d as getBrandsFromDB, h as getTrendingFromDB, a as getPriceDropsFromDB, f as getProductCount, i as getShopCount, j as getPopularModels } from '../chunks/products_DQrRaeeW.mjs';
import { S as SearchBar } from '../chunks/SearchBar_DC-3eI-y.mjs';
export { renderers } from '../renderers.mjs';

const $$BrandCarousel = createComponent(async ($$result, $$props, $$slots) => {
  const allBrands = await getBrandsFromDB();
  const brands = allBrands.slice(0, 20);
  return renderTemplate`${maybeRenderHead()}<section class="overflow-hidden py-16"> <div class="mx-auto max-w-7xl px-4 sm:px-6"> <h2 class="mb-8 text-xs font-bold uppercase tracking-[0.2em] text-text-muted">Populaire merken</h2> </div> <div class="flex gap-4 overflow-x-auto px-4 pb-4 scrollbar-hide sm:px-6"> ${brands.map((brand) => renderTemplate`<a${addAttribute(`/merken/${brand.slug}`, "href")} class="flex min-w-[140px] flex-col items-center gap-3 rounded-2xl border border-border/50 bg-bg-card px-6 py-6 transition-all duration-300 hover:-translate-y-1 hover:border-accent/30 hover:shadow-lg hover:shadow-accent/5"> ${brand.logo_url ? renderTemplate`<img${addAttribute(brand.logo_url, "src")}${addAttribute(brand.name, "alt")} class="h-10 w-auto object-contain" loading="lazy" onerror="this.style.display='none';this.nextElementSibling.style.display='block'">
          <span class="hidden text-3xl font-black text-text">${brand.name.charAt(0)}</span>` : renderTemplate`<span class="text-3xl font-black text-text">${brand.name.charAt(0)}</span>`} <span class="text-sm font-bold tracking-wide text-text">${brand.name}</span> </a>`)} </div> </section>`;
}, "C:/Users/Roel/clawd/sneakerpicks/src/components/BrandCarousel.astro", void 0);

var __freeze = Object.freeze;
var __defProp = Object.defineProperty;
var __template = (cooked, raw) => __freeze(__defProp(cooked, "raw", { value: __freeze(cooked.slice()) }));
var _a;
const $$Index = createComponent(async ($$result, $$props, $$slots) => {
  const trending = await getTrendingFromDB(8);
  const priceDrops = await getPriceDropsFromDB(8);
  const totalProductsRaw = await getProductCount();
  const totalShops = await getShopCount();
  const roundedK = Math.floor(totalProductsRaw / 1e3);
  const totalProducts = `${roundedK}.000`;
  const popularModels = await getPopularModels(16);
  return renderTemplate`${renderComponent($$result, "Layout", $$Layout, { "title": "SneakerPicks \u2014 Vergelijk Sneaker Prijzen | Laagste Prijs Garantie" }, { "default": async ($$result2) => renderTemplate(_a || (_a = __template([' <script type="application/ld+json">', '<\/script> <script type="application/ld+json">', "<\/script>  ", '<section class="relative overflow-hidden"> <!-- Gradient bg --> <div class="absolute inset-0 bg-gradient-to-b from-accent/5 via-transparent to-transparent"></div> <div class="absolute -top-40 left-1/2 h-80 w-80 -translate-x-1/2 rounded-full bg-accent/10 blur-[120px]"></div> <div class="relative mx-auto max-w-7xl px-4 pb-20 pt-24 sm:px-6 sm:pt-32"> <div class="mx-auto max-w-3xl text-center"> <p class="animate-fade-up mb-4 text-xs font-bold uppercase tracking-[0.3em] text-accent">\nVergelijk \u2022 Bespaar \u2022 Score\n</p> <h1 class="animate-fade-up stagger-1 text-5xl font-black leading-[1.05] tracking-tight sm:text-7xl">\nVind de <span class="text-accent">laagste</span> sneaker prijs\n</h1> <p class="animate-fade-up stagger-2 mt-6 text-lg text-text-secondary sm:text-xl">\nVergelijk prijzen bij <span class="font-semibold text-text">', '+ Nederlandse shops</span>. Mis nooit meer een deal.\n</p> <div class="animate-fade-up stagger-3 mx-auto mt-10 max-w-xl"> ', ' </div> <div class="animate-fade-up stagger-4 mt-8 flex flex-wrap items-center justify-center gap-x-6 gap-y-2 text-sm text-text-muted"> <span class="flex items-center gap-1.5"> <svg class="h-4 w-4 text-accent" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"></path></svg> ', '+ sneakers\n</span> <span class="flex items-center gap-1.5"> <svg class="h-4 w-4 text-accent" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"></path></svg> ', '+ shops\n</span> <span class="flex items-center gap-1.5"> <svg class="h-4 w-4 text-accent" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"></path></svg>\nDagelijks bijgewerkt\n</span> </div> </div> </div> </section>  <section class="mx-auto max-w-7xl px-4 py-16 sm:px-6"> <div class="mb-8 flex items-end justify-between"> <div> <h2 class="text-2xl font-black tracking-tight sm:text-3xl">Trending</h2> <p class="mt-1 text-sm text-text-muted">De populairste sneakers van dit moment</p> </div> <a href="/collecties/trending" class="text-sm font-bold text-accent transition-colors hover:text-accent-dim">\nBekijk alles \u2192\n</a> </div> <div class="grid grid-cols-2 gap-4 sm:gap-6 md:grid-cols-3 lg:grid-cols-4"> ', " </div> </section>  ", ' <section class="mx-auto max-w-7xl px-4 py-16 sm:px-6"> <div class="mb-8 flex items-end justify-between"> <div> <h2 class="text-2xl font-black tracking-tight sm:text-3xl">\nPrijsdalingen\n</h2> <p class="mt-1 text-sm text-text-muted">Sneakers die net in prijs zijn gedaald</p> </div> <a href="/collecties/sale" class="text-sm font-bold text-deal transition-colors hover:text-deal-dim">\nAlle deals \u2192\n</a> </div> <div class="grid grid-cols-2 gap-4 sm:gap-6 md:grid-cols-3 lg:grid-cols-4"> ', " </div> </section>  ", " "])), unescapeHTML(JSON.stringify({
    "@context": "https://schema.org",
    "@type": "Organization",
    name: "SneakerPicks",
    url: "https://sneakerpicks.nl",
    description: "Vergelijk sneaker prijzen bij alle Nederlandse shops. Vind de laagste prijs.",
    sameAs: []
  })), unescapeHTML(JSON.stringify({
    "@context": "https://schema.org",
    "@type": "WebSite",
    name: "SneakerPicks",
    url: "https://sneakerpicks.nl",
    potentialAction: {
      "@type": "SearchAction",
      target: "https://sneakerpicks.nl/zoeken?q={search_term_string}",
      "query-input": "required name=search_term_string"
    }
  })), maybeRenderHead(), totalShops, renderComponent($$result2, "SearchBar", SearchBar, { "client:load": true, "large": true, "client:component-hydration": "load", "client:component-path": "C:/Users/Roel/clawd/sneakerpicks/src/components/SearchBar.tsx", "client:component-export": "default" }), totalProducts, totalShops, trending.map((sneaker, i) => renderTemplate`${renderComponent($$result2, "ProductCard", $$ProductCard, { "sneaker": sneaker, "index": i })}`), popularModels.length > 0 && renderTemplate`<section class="mx-auto max-w-7xl px-4 py-12 sm:px-6"> <h2 class="mb-6 text-sm font-bold uppercase tracking-widest text-text-muted">Populaire modellen</h2> <div class="flex flex-wrap gap-2"> ${popularModels.map((m) => renderTemplate`<a${addAttribute(`/merken/${m.brandSlug}/${m.slug}`, "href")} class="inline-flex items-center gap-2 rounded-full border border-border/50 bg-bg-card px-4 py-2 text-sm font-semibold text-text-secondary hover:border-accent/40 hover:text-accent transition-all hover:shadow-md hover:shadow-accent/5"> <span class="text-text-muted text-xs">${m.brandName}</span> ${m.name} </a>`)} </div> </section>`, priceDrops.map((sneaker, i) => renderTemplate`${renderComponent($$result2, "ProductCard", $$ProductCard, { "sneaker": sneaker, "index": i })}`), renderComponent($$result2, "BrandCarousel", $$BrandCarousel, {})) })}`;
}, "C:/Users/Roel/clawd/sneakerpicks/src/pages/index.astro", void 0);

const $$file = "C:/Users/Roel/clawd/sneakerpicks/src/pages/index.astro";
const $$url = "";

const _page = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
  __proto__: null,
  default: $$Index,
  file: $$file,
  url: $$url
}, Symbol.toStringTag, { value: 'Module' }));

const page = () => _page;

export { page };
