"use client"; import { canAddToCart, type SelectedOption } from "@shopify/hydrogen"; import { ShopPayButton } from "@shopify/hydrogen/react"; import Link from "next/link"; import { useRouter, useSearchParams } from "next/navigation"; import { ProductViewedTracker } from "@/components/ProductViewedTracker"; import { QuantityStepper } from "@/components/QuantityStepper"; import { openCartDrawer } from "@/lib/cart-drawer"; import { content } from "@/lib/content"; import { shopifyImageUrl, srcSetFor } from "@/lib/image"; import { formatPrice } from "@/lib/money"; import { ProductProvider, useProductForm } from "@/lib/product"; import type { ProductData } from "@/lib/product-query"; import { canonicalUrl, jsonLdScript } from "@/lib/site"; /** * Interactive product details (`hydrogen-variant-form` / * `references/nextjs.md`). Wraps the server-fetched product in `ProductProvider`; * variant selection + add-to-cart live here (client). Same-product option values * are GET ``s with `aria-current` (no-JS degrades to server variant * resolution); cross-product values navigate to the other product; non-existent * combinations are disabled `