import { c as createComponent, m as maybeRenderHead, d as addAttribute, a as renderTemplate, b as createAstro, r as renderComponent } from '../chunks/astro/server_i-dTRwm2.mjs';
import 'piccolore';
import { $ as $$BaseLayout } from '../chunks/BaseLayout_rqQLf6w4.mjs';
import { $ as $$Header, p as productCategories, a as $$Footer, b as $$FloatingContact } from '../chunks/FloatingContact_06TlrfGj.mjs';
import 'clsx';
export { renderers } from '../renderers.mjs';

const $$Astro = createAstro();
const $$ProductCard = createComponent(($$result, $$props, $$slots) => {
  const Astro2 = $$result.createAstro($$Astro, $$props, $$slots);
  Astro2.self = $$ProductCard;
  const { product } = Astro2.props;
  const { name, shortDescription, image } = product.data;
  return renderTemplate`${maybeRenderHead()}<a${addAttribute(`/products/${product.data.slug}`, "href")} class="card group"> <div class="aspect-w-16 aspect-h-9 overflow-hidden bg-secondary-100"> <img${addAttribute(image || "/placeholder.jpg", "src")}${addAttribute(name, "alt")} class="object-cover w-full h-48 group-hover:scale-105 transition-transform duration-300" loading="lazy"> </div> <div class="p-6"> <h3 class="text-lg font-bold text-secondary-900 group-hover:text-primary-600 transition-colors"> ${name} </h3> ${shortDescription && renderTemplate`<p class="mt-2 text-sm text-secondary-600 line-clamp-2"> ${shortDescription} </p>`} <div class="mt-4 flex items-center text-primary-600 font-medium"> <span>ดูรายละเอียด</span> <svg class="w-4 h-4 ml-2 group-hover:translate-x-1 transition-transform" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path stroke-linecap="round" stroke-linejoin="round"${addAttribute(2, "stroke-width")} d="M9 5l7 7-7 7"></path> </svg> </div> </div> </a>`;
}, "/Users/kunthawatgreethong/Gitea/dealplustech/src/components/ProductCard.astro", void 0);

const $$Index = createComponent(($$result, $$props, $$slots) => {
  return renderTemplate`${renderComponent($$result, "BaseLayout", $$BaseLayout, { "title": "\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32", "description": "\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32\u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32" }, { "default": ($$result2) => renderTemplate` ${renderComponent($$result2, "Header", $$Header, {})} ${maybeRenderHead()}<main class="pt-32 pb-16 bg-gray-50"> <div class="container mx-auto px-4"> <h1 class="section-title text-center mb-4">สินค้าทั้งหมด</h1> <p class="section-subtitle text-center mb-12">เลือกสินค้าคุณภาพสูงจากเรา</p> <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"> ${productCategories.map((product) => renderTemplate`${renderComponent($$result2, "ProductCard", $$ProductCard, { "product": product })}`)} </div> </div> </main> ${renderComponent($$result2, "Footer", $$Footer, {})} ${renderComponent($$result2, "FloatingContact", $$FloatingContact, {})} ` })}`;
}, "/Users/kunthawatgreethong/Gitea/dealplustech/src/pages/products/index.astro", void 0);

const $$file = "/Users/kunthawatgreethong/Gitea/dealplustech/src/pages/products/index.astro";
const $$url = "/products";

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 };
