{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "product-list-rows",
  "title": "Product List View (Rows)",
  "description": "A product list laid out as rows: photo, blurb, spec chips, stars and live stock, price with the old price, a quantity stepper and add to cart, wishlist hearts, expandable details, a compare checkbox that fills a tray, sorting and a comfortable / compact density switch.",
  "dependencies": [
    "motion",
    "clsx",
    "tailwind-merge"
  ],
  "files": [
    {
      "path": "registry/new-york/product-list-rows/product-list-rows.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { AnimatePresence, LayoutGroup, motion, useReducedMotion } from \"motion/react\";\nimport { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nfunction cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs));\n}\n\nexport interface RowProduct {\n  id: string;\n  name: string;\n  /** One line under the name. */\n  blurb: string;\n  price: number;\n  was?: number;\n  image: string;\n  rating: number;\n  reviews: number;\n  /** Units left; 0 = sold out. */\n  stock: number;\n  /** Short facts shown as chips. */\n  specs: string[];\n  /** Bullet points shown when the row is expanded. */\n  details: string[];\n}\ntype SortKey = \"featured\" | \"price-asc\" | \"price-desc\" | \"rating\";\n\nexport interface ProductListRowsProps {\n  title?: string;\n  products?: RowProduct[];\n  currency?: string;\n  /** Rows with more room, or compact rows that hide chips and blurbs. */\n  defaultDensity?: \"comfortable\" | \"compact\";\n  /** Most products the compare tray holds. */\n  maxCompare?: number;\n  onAdd?: (product: RowProduct, quantity: number) => void;\n  onWishlist?: (product: RowProduct, saved: boolean) => void;\n  onCompare?: (products: RowProduct[]) => void;\n  theme?: \"dark\" | \"light\";\n  className?: string;\n}\n\nconst PALETTES = {\n  dark: {\n    bg: \"#0A0A0A\",\n    title: \"#FFFFFF\",\n    muted: \"rgba(255,255,255,0.45)\",\n    body: \"rgba(255,255,255,0.62)\",\n    line: \"rgba(255,255,255,0.12)\",\n    card: \"#161616\",\n    tile: \"#F1F1F1\",\n    chip: \"rgba(255,255,255,0.07)\",\n    accent: \"#7CDE6A\",\n    warn: \"#F2B15A\",\n    danger: \"#FF8A7A\",\n    star: \"#F5C451\",\n    buttonBg: \"#FFFFFF\",\n    buttonText: \"#111111\",\n    ring: \"rgba(255,255,255,0.55)\",\n    field: \"#121212\",\n  },\n  light: {\n    bg: \"#FFFFFF\",\n    title: \"#111111\",\n    muted: \"rgba(0,0,0,0.45)\",\n    body: \"rgba(0,0,0,0.62)\",\n    line: \"rgba(0,0,0,0.1)\",\n    card: \"#F7F7F7\",\n    tile: \"#F1F1F1\",\n    chip: \"rgba(0,0,0,0.05)\",\n    accent: \"#2F9E44\",\n    warn: \"#B7791F\",\n    danger: \"#C0392B\",\n    star: \"#E0A100\",\n    buttonBg: \"#111111\",\n    buttonText: \"#FFFFFF\",\n    ring: \"rgba(0,0,0,0.45)\",\n    field: \"#FFFFFF\",\n  },\n};\n\nconst L = \"/demo/blocks/product-list\";\nconst PRODUCTS: RowProduct[] = [\n  {\n    id: \"earbuds\",\n    name: \"Wireless Earbuds\",\n    blurb: \"Noise cancelling, 32 h with the case.\",\n    price: 129,\n    image: \"/demo/wireless-earbuds.webp\",\n    rating: 4.7,\n    reviews: 412,\n    stock: 38,\n    specs: [\"ANC\", \"32 h battery\", \"IPX4\"],\n    details: [\"Three noise modes, switch with a long press\", \"Wireless charging case, USB-C\", \"Fits come in four tip sizes\"],\n  },\n  {\n    id: \"watch\",\n    name: \"Minimal Watch\",\n    blurb: \"38 mm steel case, sapphire glass.\",\n    price: 79,\n    was: 129,\n    image: \"/demo/minimal-watch.webp\",\n    rating: 4.8,\n    reviews: 268,\n    stock: 3,\n    specs: [\"38 mm\", \"5 ATM\", \"Swap straps\"],\n    details: [\"Japanese quartz movement, 3-year battery\", \"Quick-release 20 mm straps\", \"Two-year warranty\"],\n  },\n  {\n    id: \"stand\",\n    name: \"Laptop Stand\",\n    blurb: \"Raises the screen to eye level, folds flat.\",\n    price: 49,\n    was: 89,\n    image: \"/demo/laptop-stand.webp\",\n    rating: 4.6,\n    reviews: 530,\n    stock: 120,\n    specs: [\"Aluminium\", \"6 heights\", \"Fits 11–17″\"],\n    details: [\"Holds up to 8 kg\", \"Silicone pads protect the laptop\", \"Folds to 9 mm for travel\"],\n  },\n  {\n    id: \"headphones\",\n    name: \"Studio Headphones\",\n    blurb: \"Closed-back, tuned flat for mixing.\",\n    price: 199,\n    image: `${L}/headphones.webp`,\n    rating: 4.6,\n    reviews: 154,\n    stock: 0,\n    specs: [\"40 mm drivers\", \"Wired + BT\", \"Fold flat\"],\n    details: [\"Replaceable ear pads and cable\", \"Comes with a hard case\", \"Back in stock around Dec 2\"],\n  },\n  {\n    id: \"bottle\",\n    name: \"Insulated Bottle\",\n    blurb: \"Cold for 24 h, hot for 12 h.\",\n    price: 39,\n    image: \"/demo/insulated-water-bottle.webp\",\n    rating: 4.9,\n    reviews: 903,\n    stock: 64,\n    specs: [\"750 ml\", \"Steel\", \"Leak-proof\"],\n    details: [\"Powder-coated, dishwasher safe\", \"Fits car cup holders\", \"Lifetime warranty on the seal\"],\n  },\n  {\n    id: \"shoes\",\n    name: \"Running Shoes\",\n    blurb: \"Light daily trainer with a rocker sole.\",\n    price: 99,\n    was: 149,\n    image: \"/demo/running-shoes.webp\",\n    rating: 4.5,\n    reviews: 187,\n    stock: 7,\n    specs: [\"8 mm drop\", \"240 g\", \"Recycled knit\"],\n    details: [\"Wide fit available in 42–46\", \"Reflective heel tab\", \"Free returns on worn pairs within 30 days\"],\n  },\n];\n\nconst money = (n: number, c: string) => `${c}${n.toFixed(2)}`;\nconst SORTS: { id: SortKey; label: string }[] = [\n  { id: \"featured\", label: \"Featured\" },\n  { id: \"price-asc\", label: \"Price, low to high\" },\n  { id: \"price-desc\", label: \"Price, high to low\" },\n  { id: \"rating\", label: \"Top rated\" },\n];\n\nfunction Stars({ value, color, empty }: { value: number; color: string; empty: string }) {\n  const id = React.useId();\n  return (\n    <span className=\"relative inline-flex\" aria-hidden=\"true\">\n      {[0, 1, 2, 3, 4].map((i) => {\n        const fill = Math.max(0, Math.min(1, value - i));\n        return (\n          <svg key={i} width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" className=\"shrink-0\">\n            <defs>\n              <linearGradient id={`${id}-${i}`}>\n                <stop offset={`${fill * 100}%`} stopColor={color} />\n                <stop offset={`${fill * 100}%`} stopColor={empty} />\n              </linearGradient>\n            </defs>\n            <path d=\"m12 2.8 2.8 5.8 6.3.9-4.6 4.4 1.1 6.3L12 17.2l-5.6 3 1.1-6.3-4.6-4.4 6.3-.9z\" fill={`url(#${id}-${i})`} />\n          </svg>\n        );\n      })}\n    </span>\n  );\n}\n\nexport function ProductListRows({ title = \"All products\", products = PRODUCTS, currency = \"$\", defaultDensity = \"comfortable\", maxCompare = 3, onAdd, onWishlist, onCompare, theme = \"dark\", className }: ProductListRowsProps) {\n  const p = PALETTES[theme];\n  const reduce = !!useReducedMotion();\n  const uid = React.useId();\n  const [sort, setSort] = React.useState<SortKey>(\"featured\");\n  const [density, setDensity] = React.useState(defaultDensity);\n  const [qty, setQty] = React.useState<Record<string, number>>({});\n  const [open, setOpen] = React.useState<string | null>(null);\n  const [saved, setSaved] = React.useState<string[]>([]);\n  const [compare, setCompare] = React.useState<string[]>([]);\n  const [added, setAdded] = React.useState<string | null>(null);\n  const timer = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n  React.useEffect(() => () => void (timer.current && clearTimeout(timer.current)), []);\n\n  const list = React.useMemo(() => {\n    const l = [...products];\n    if (sort === \"price-asc\") l.sort((a, b) => a.price - b.price);\n    if (sort === \"price-desc\") l.sort((a, b) => b.price - a.price);\n    if (sort === \"rating\") l.sort((a, b) => b.rating - a.rating || b.reviews - a.reviews);\n    return l;\n  }, [products, sort]);\n  const compact = density === \"compact\";\n\n  const add = (item: RowProduct) => {\n    const n = qty[item.id] ?? 1;\n    onAdd?.(item, n);\n    setAdded(item.id);\n    if (timer.current) clearTimeout(timer.current);\n    timer.current = setTimeout(() => setAdded(null), 1500);\n  };\n  const toggleCompare = (id: string) => setCompare((c) => (c.includes(id) ? c.filter((x) => x !== id) : c.length >= maxCompare ? c : [...c, id]));\n  const focus = `outline-none focus-visible:ring-2 focus-visible:ring-offset-2`;\n  const ringStyle = { \"--tw-ring-color\": p.ring, \"--tw-ring-offset-color\": p.bg } as React.CSSProperties;\n\n  return (\n    <section aria-labelledby={`${uid}-h`} className={cn(\"relative w-full overflow-clip px-4 py-10 sm:px-8\", className)} style={{ background: p.bg, color: p.title, ...ringStyle }}>\n      <div className=\"mx-auto max-w-5xl\">\n        <div className=\"flex flex-wrap items-end justify-between gap-4\">\n          <div>\n            <h2 id={`${uid}-h`} className=\"m-0 text-[26px] font-semibold tracking-[-0.02em] sm:text-[30px]\">\n              {title}\n            </h2>\n            <p className=\"m-0 mt-1 text-[14px]\" style={{ color: p.muted }} aria-live=\"polite\">\n              {list.length} products\n            </p>\n          </div>\n          <div className=\"flex items-center gap-2\">\n            <label htmlFor={`${uid}-sort`} className=\"sr-only\">\n              Sort by\n            </label>\n            <select\n              id={`${uid}-sort`}\n              value={sort}\n              onChange={(e) => setSort(e.target.value as SortKey)}\n              className={cn(\"h-9 cursor-pointer rounded-full border px-3.5 text-[16px] sm:text-[13px]\", focus)}\n              style={{ background: p.field, borderColor: p.line, color: p.title, colorScheme: theme }}\n            >\n              {SORTS.map((s) => (\n                <option key={s.id} value={s.id}>\n                  {s.label}\n                </option>\n              ))}\n            </select>\n            <div role=\"radiogroup\" aria-label=\"Row density\" className=\"flex rounded-full border p-0.5\" style={{ borderColor: p.line }}>\n              {([\"comfortable\", \"compact\"] as const).map((d) => (\n                <button\n                  key={d}\n                  type=\"button\"\n                  role=\"radio\"\n                  aria-checked={density === d}\n                  aria-label={d === \"comfortable\" ? \"Comfortable rows\" : \"Compact rows\"}\n                  onClick={() => setDensity(d)}\n                  className={cn(\"flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border-0\", focus)}\n                  style={{ background: density === d ? p.buttonBg : \"transparent\", color: density === d ? p.buttonText : p.muted }}\n                >\n                  <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"currentColor\" aria-hidden=\"true\">\n                    {d === \"comfortable\" ? (\n                      <>\n                        <rect x=\"0.5\" y=\"1\" width=\"13\" height=\"5\" rx=\"1.2\" />\n                        <rect x=\"0.5\" y=\"8\" width=\"13\" height=\"5\" rx=\"1.2\" />\n                      </>\n                    ) : (\n                      <>\n                        <rect x=\"0.5\" y=\"1\" width=\"13\" height=\"3\" rx=\"1\" />\n                        <rect x=\"0.5\" y=\"5.5\" width=\"13\" height=\"3\" rx=\"1\" />\n                        <rect x=\"0.5\" y=\"10\" width=\"13\" height=\"3\" rx=\"1\" />\n                      </>\n                    )}\n                  </svg>\n                </button>\n              ))}\n            </div>\n          </div>\n        </div>\n\n        <LayoutGroup>\n          <ul className=\"m-0 mt-6 list-none border-t p-0\" style={{ borderColor: p.line }}>\n            {list.map((item) => {\n              const n = qty[item.id] ?? 1;\n              const out = item.stock === 0;\n              const low = item.stock > 0 && item.stock <= 8;\n              const isOpen = open === item.id;\n              const inCompare = compare.includes(item.id);\n              const isSaved = saved.includes(item.id);\n              return (\n                <motion.li key={item.id} layout={reduce ? false : \"position\"} transition={{ duration: 0.35, ease: [0.22, 1, 0.36, 1] }} className=\"border-b\" style={{ borderColor: p.line }}>\n                  <div className={cn(\"grid grid-cols-[auto_minmax(0,1fr)] gap-x-4 gap-y-3 sm:grid-cols-[auto_minmax(0,1fr)_auto] sm:gap-x-6\", compact ? \"py-3\" : \"py-5\")}>\n                    <div className={cn(\"relative shrink-0 overflow-hidden rounded-xl\", compact ? \"h-16 w-16\" : \"h-24 w-24 sm:h-32 sm:w-32\")} style={{ background: p.tile }}>\n                      {/* eslint-disable-next-line @next/next/no-img-element -- plain img keeps the block framework-agnostic */}\n                      <img src={item.image} alt={item.name} width={256} height={256} className={cn(\"h-full w-full object-contain p-1.5\", out && \"opacity-50 grayscale\")} />\n                      {item.was && !compact && (\n                        <span className=\"absolute top-1.5 left-1.5 rounded-full px-1.5 py-0.5 text-[10.5px] font-semibold\" style={{ background: p.accent, color: \"#0B1A08\" }}>\n                          −{Math.round((1 - item.price / item.was) * 100)}%\n                        </span>\n                      )}\n                    </div>\n\n                    <div className=\"min-w-0\">\n                      <h3 className=\"m-0 text-[16px] font-semibold\">{item.name}</h3>\n                      <p className=\"m-0 mt-0.5 text-[15px] font-semibold tabular-nums sm:hidden\">\n                        {money(item.price, currency)}\n                        {item.was && (\n                          <span className=\"ml-1.5 text-[12.5px] font-normal line-through\" style={{ color: p.muted }}>\n                            {money(item.was, currency)}\n                          </span>\n                        )}\n                      </p>\n                      {!compact && (\n                        <p className=\"m-0 mt-0.5 text-[13.5px]\" style={{ color: p.body }}>\n                          {item.blurb}\n                        </p>\n                      )}\n                      <p className=\"m-0 mt-1.5 flex flex-wrap items-center gap-x-2 gap-y-1 text-[12.5px]\" style={{ color: p.muted }}>\n                        <Stars value={item.rating} color={p.star} empty={p.line} />\n                        <span>\n                          {item.rating} ({item.reviews})\n                        </span>\n                        <span aria-hidden=\"true\">·</span>\n                        <span style={{ color: out ? p.danger : low ? p.warn : p.accent }}>{out ? \"Sold out\" : low ? `Only ${item.stock} left` : \"In stock\"}</span>\n                      </p>\n                      {!compact && (\n                        <ul className=\"m-0 mt-2.5 hidden list-none flex-wrap gap-1.5 p-0 sm:flex\">\n                          {item.specs.map((s) => (\n                            <li key={s} className=\"rounded-full px-2.5 py-1 text-[11.5px]\" style={{ background: p.chip, color: p.body }}>\n                              {s}\n                            </li>\n                          ))}\n                        </ul>\n                      )}\n                      <div className=\"mt-2.5 flex flex-wrap items-center gap-x-4 gap-y-1 text-[12.5px]\">\n                        <button\n                          type=\"button\"\n                          aria-expanded={isOpen}\n                          aria-controls={`${uid}-${item.id}-d`}\n                          onClick={() => setOpen(isOpen ? null : item.id)}\n                          className={cn(\"cursor-pointer rounded border-0 bg-transparent p-0 underline underline-offset-4\", focus)}\n                          style={{ color: p.body }}\n                        >\n                          {isOpen ? \"Hide details\" : \"Details\"}\n                        </button>\n                        <label className=\"flex cursor-pointer items-center gap-1.5\" style={{ color: inCompare ? p.title : p.body }}>\n                          <input\n                            type=\"checkbox\"\n                            checked={inCompare}\n                            disabled={!inCompare && compare.length >= maxCompare}\n                            onChange={() => toggleCompare(item.id)}\n                            className=\"h-3.5 w-3.5 cursor-pointer disabled:cursor-not-allowed\"\n                            style={{ accentColor: p.accent }}\n                          />\n                          Compare\n                        </label>\n                      </div>\n                    </div>\n\n                    <div className=\"col-span-2 flex items-center gap-1.5 sm:col-span-1 sm:flex-col sm:items-end sm:gap-2\">\n                      <p className=\"m-0 hidden text-[17px] font-semibold tabular-nums sm:block\">\n                        {money(item.price, currency)}\n                        {item.was && (\n                          <span className=\"ml-1.5 text-[13px] font-normal line-through\" style={{ color: p.muted }}>\n                            {money(item.was, currency)}\n                          </span>\n                        )}\n                      </p>\n                      <div className=\"flex w-full items-center gap-1.5 sm:w-auto sm:gap-2\">\n                        {!out && (\n                          <div className=\"flex items-center rounded-full border\" style={{ borderColor: p.line }}>\n                            <button\n                              type=\"button\"\n                              aria-label={`One less ${item.name}`}\n                              disabled={n <= 1}\n                              onClick={() => setQty((q) => ({ ...q, [item.id]: Math.max(1, n - 1) }))}\n                              className={cn(\"h-9 w-7 cursor-pointer rounded-full border-0 bg-transparent text-[15px] disabled:opacity-30 sm:w-8\", focus)}\n                              style={{ color: p.title }}\n                            >\n                              −\n                            </button>\n                            <span className=\"w-5 text-center text-[13.5px] tabular-nums\" aria-label={`Quantity ${n}`}>\n                              {n}\n                            </span>\n                            <button\n                              type=\"button\"\n                              aria-label={`One more ${item.name}`}\n                              disabled={n >= Math.min(9, item.stock)}\n                              onClick={() => setQty((q) => ({ ...q, [item.id]: Math.min(9, item.stock, n + 1) }))}\n                              className={cn(\"h-9 w-7 cursor-pointer rounded-full border-0 bg-transparent text-[15px] disabled:opacity-30 sm:w-8\", focus)}\n                              style={{ color: p.title }}\n                            >\n                              +\n                            </button>\n                          </div>\n                        )}\n                        <button\n                          type=\"button\"\n                          onClick={() => (out ? onWishlist?.(item, true) : add(item))}\n                          aria-label={out ? `Notify me when ${item.name} is back` : `Add ${n} ${item.name} to cart`}\n                          className={cn(\"h-9 flex-1 cursor-pointer rounded-full border px-3.5 text-[13px] font-semibold whitespace-nowrap transition-colors sm:min-w-[104px] sm:flex-none sm:px-4\", focus)}\n                          style={\n                            out\n                              ? { background: \"transparent\", color: p.title, borderColor: p.line }\n                              : added === item.id\n                                ? { background: p.accent, color: \"#0B1A08\", borderColor: p.accent }\n                                : { background: p.buttonBg, color: p.buttonText, borderColor: p.buttonBg }\n                          }\n                        >\n                          {out ? \"Notify me\" : added === item.id ? \"Added ✓\" : \"Add to cart\"}\n                        </button>\n                        <button\n                          type=\"button\"\n                          aria-pressed={isSaved}\n                          aria-label={isSaved ? `Remove ${item.name} from wishlist` : `Save ${item.name}`}\n                          onClick={() => {\n                            setSaved((s) => (isSaved ? s.filter((x) => x !== item.id) : [...s, item.id]));\n                            onWishlist?.(item, !isSaved);\n                          }}\n                          className={cn(\"flex h-9 w-9 cursor-pointer items-center justify-center rounded-full border bg-transparent\", focus)}\n                          style={{ borderColor: p.line, color: isSaved ? p.danger : p.body }}\n                        >\n                          <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill={isSaved ? \"currentColor\" : \"none\"} stroke=\"currentColor\" strokeWidth=\"1.8\" aria-hidden=\"true\">\n                            <path d=\"M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10Z\" strokeLinejoin=\"round\" />\n                          </svg>\n                        </button>\n                      </div>\n                    </div>\n                  </div>\n                  <AnimatePresence initial={false}>\n                    {isOpen && (\n                      <motion.div\n                        id={`${uid}-${item.id}-d`}\n                        initial={reduce ? false : { height: 0, opacity: 0 }}\n                        animate={{ height: \"auto\", opacity: 1 }}\n                        exit={reduce ? undefined : { height: 0, opacity: 0 }}\n                        transition={{ duration: 0.25 }}\n                        className=\"overflow-hidden\"\n                      >\n                        <ul className=\"m-0 mb-5 grid list-none grid-cols-1 gap-2 rounded-xl p-4 text-[13.5px] sm:grid-cols-3\" style={{ background: p.card, color: p.body }}>\n                          {item.details.map((d) => (\n                            <li key={d} className=\"flex gap-2\">\n                              <span aria-hidden=\"true\" style={{ color: p.accent }}>\n                                ✓\n                              </span>\n                              {d}\n                            </li>\n                          ))}\n                        </ul>\n                      </motion.div>\n                    )}\n                  </AnimatePresence>\n                </motion.li>\n              );\n            })}\n          </ul>\n        </LayoutGroup>\n\n        <AnimatePresence>\n          {compare.length > 0 && (\n            <motion.div\n              initial={reduce ? false : { y: 80, opacity: 0 }}\n              animate={{ y: 0, opacity: 1 }}\n              exit={reduce ? undefined : { y: 80, opacity: 0 }}\n              transition={{ type: \"spring\", stiffness: 380, damping: 34 }}\n              className=\"sticky bottom-3 z-10 mx-auto mt-5 flex max-w-xl items-center gap-3 rounded-2xl border p-2.5 pl-3 shadow-[0_12px_40px_rgba(0,0,0,0.35)]\"\n              style={{ background: p.card, borderColor: p.line }}\n              role=\"region\"\n              aria-label=\"Compare tray\"\n            >\n              <div className=\"flex -space-x-2\">\n                {compare.map((id) => {\n                  const item = products.find((x) => x.id === id)!;\n                  return (\n                    <button\n                      key={id}\n                      type=\"button\"\n                      onClick={() => toggleCompare(id)}\n                      aria-label={`Remove ${item.name} from compare`}\n                      className={cn(\"h-10 w-10 cursor-pointer overflow-hidden rounded-lg border-2 p-0\", focus)}\n                      style={{ background: p.tile, borderColor: p.card }}\n                    >\n                      {/* eslint-disable-next-line @next/next/no-img-element -- plain img keeps the block framework-agnostic */}\n                      <img src={item.image} alt=\"\" width={80} height={80} className=\"h-full w-full object-contain p-0.5\" />\n                    </button>\n                  );\n                })}\n              </div>\n              <p className=\"m-0 flex-1 text-[13px]\" style={{ color: p.body }} aria-live=\"polite\">\n                {compare.length < 2 ? \"Pick one more to compare\" : `${compare.length} of ${maxCompare} selected`}\n              </p>\n              <button type=\"button\" onClick={() => setCompare([])} className={cn(\"cursor-pointer rounded border-0 bg-transparent px-2 text-[12.5px] underline underline-offset-4\", focus)} style={{ color: p.muted }}>\n                Clear\n              </button>\n              <button\n                type=\"button\"\n                disabled={compare.length < 2}\n                onClick={() => onCompare?.(compare.map((id) => products.find((x) => x.id === id)!))}\n                className={cn(\"h-9 cursor-pointer rounded-full border-0 px-4 text-[13px] font-semibold disabled:cursor-not-allowed disabled:opacity-40\", focus)}\n                style={{ background: p.buttonBg, color: p.buttonText }}\n              >\n                Compare\n              </button>\n            </motion.div>\n          )}\n        </AnimatePresence>\n      </div>\n    </section>\n  );\n}\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}