{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "horizontal-filter-bar",
  "title": "Horizontal Filter Bar",
  "description": "A sticky filter bar above a product grid: dropdown pills for category (with live counts), price range with presets, colour swatches and rating, one-tap On sale and In stock toggles, a sort menu, removable active-filter chips with clear all, and a grid that reflows with animation; scrolls sideways on phones.",
  "dependencies": [
    "motion",
    "clsx",
    "tailwind-merge"
  ],
  "files": [
    {
      "path": "registry/new-york/horizontal-filter-bar/horizontal-filter-bar.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { AnimatePresence, 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 FilterBarProduct {\n  id: string;\n  name: string;\n  price: number;\n  was?: number;\n  image: string;\n  category: string;\n  color: string;\n  rating: number;\n  inStock: boolean;\n}\ntype Sort = \"featured\" | \"price-asc\" | \"price-desc\" | \"rating\";\ntype MenuId = \"category\" | \"price\" | \"color\" | \"rating\" | \"sort\" | null;\n\nexport interface HorizontalFilterBarProps {\n  title?: string;\n  products?: FilterBarProduct[];\n  /** Swatch colours by name. */\n  colors?: Record<string, string>;\n  currency?: string;\n  onFiltersChange?: (filters: { categories: string[]; colors: string[]; min: number; max: number; rating: number; sale: boolean; inStock: boolean; sort: Sort }) => void;\n  onAdd?: (product: FilterBarProduct) => void;\n  theme?: \"dark\" | \"light\";\n  className?: string;\n}\n\nconst PALETTES = {\n  dark: {\n    bg: \"#0A0A0A\",\n    bar: \"#121212\",\n    menu: \"#181818\",\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    tile: \"#F1F1F1\",\n    accent: \"#7CDE6A\",\n    accentText: \"#0B1A08\",\n    star: \"#F5C451\",\n    buttonBg: \"#FFFFFF\",\n    buttonText: \"#111111\",\n    ghost: \"rgba(255,255,255,0.07)\",\n    ring: \"rgba(255,255,255,0.55)\",\n  },\n  light: {\n    bg: \"#FFFFFF\",\n    bar: \"#F7F7F7\",\n    menu: \"#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    tile: \"#F1F1F1\",\n    accent: \"#2F9E44\",\n    accentText: \"#FFFFFF\",\n    star: \"#E0A100\",\n    buttonBg: \"#111111\",\n    buttonText: \"#FFFFFF\",\n    ghost: \"rgba(0,0,0,0.05)\",\n    ring: \"rgba(0,0,0,0.45)\",\n  },\n};\n\nconst L = \"/demo/blocks/product-list\";\nconst PRODUCTS: FilterBarProduct[] = [\n  { id: \"earbuds\", name: \"Wireless Earbuds\", price: 129, image: \"/demo/wireless-earbuds.webp\", category: \"Audio\", color: \"Black\", rating: 4.7, inStock: true },\n  { id: \"headphones\", name: \"Studio Headphones\", price: 199, image: `${L}/headphones.webp`, category: \"Audio\", color: \"Grey\", rating: 4.6, inStock: false },\n  { id: \"watch\", name: \"Minimal Watch\", price: 79, was: 129, image: \"/demo/minimal-watch.webp\", category: \"Wearables\", color: \"Black\", rating: 4.8, inStock: true },\n  { id: \"shoes\", name: \"Running Shoes\", price: 99, was: 149, image: \"/demo/running-shoes.webp\", category: \"Outdoor\", color: \"Grey\", rating: 4.5, inStock: true },\n  { id: \"bottle\", name: \"Insulated Bottle\", price: 39, image: \"/demo/insulated-water-bottle.webp\", category: \"Outdoor\", color: \"Black\", rating: 4.9, inStock: true },\n  { id: \"stand\", name: \"Laptop Stand\", price: 49, was: 89, image: \"/demo/laptop-stand.webp\", category: \"Desk\", color: \"Silver\", rating: 4.6, inStock: true },\n  { id: \"lamp\", name: \"Desk Lamp\", price: 59, image: `${L}/lamp.webp`, category: \"Desk\", color: \"Black\", rating: 4.4, inStock: true },\n  { id: \"notebook\", name: \"Dot Notebook\", price: 24, image: \"/demo/notebook.webp\", category: \"Desk\", color: \"Sand\", rating: 4.8, inStock: true },\n  { id: \"backpack\", name: \"Day Backpack\", price: 89, image: `${L}/backpack.webp`, category: \"Outdoor\", color: \"Grey\", rating: 4.7, inStock: false },\n];\nconst COLORS: Record<string, string> = { Black: \"#1E1E1E\", Grey: \"#9A9A9A\", Silver: \"#D6D6D6\", Sand: \"#D8C8AD\" };\nconst SORTS: { id: Sort; 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];\nconst PRICE_MAX = 200;\nconst money = (n: number, c: string) => `${c}${n % 1 ? n.toFixed(2) : n}`;\nconst toggle = <T,>(l: T[], v: T) => (l.includes(v) ? l.filter((x) => x !== v) : [...l, v]);\n\nexport function HorizontalFilterBar({ title = \"Shop all\", products = PRODUCTS, colors = COLORS, currency = \"$\", onFiltersChange, onAdd, theme = \"dark\", className }: HorizontalFilterBarProps) {\n  const p = PALETTES[theme];\n  const reduce = !!useReducedMotion();\n  const uid = React.useId();\n  const [cats, setCats] = React.useState<string[]>([]);\n  const [cols, setCols] = React.useState<string[]>([]);\n  const [range, setRange] = React.useState<[number, number]>([0, PRICE_MAX]);\n  const [rating, setRating] = React.useState(0);\n  const [sale, setSale] = React.useState(false);\n  const [inStock, setInStock] = React.useState(false);\n  const [sort, setSort] = React.useState<Sort>(\"featured\");\n  const [menu, setMenu] = React.useState<MenuId>(null);\n  const [added, setAdded] = React.useState<string | null>(null);\n  const barRef = React.useRef<HTMLDivElement>(null);\n  const categories = React.useMemo(() => [...new Set(products.map((x) => x.category))], [products]);\n\n  React.useEffect(() => {\n    onFiltersChange?.({ categories: cats, colors: cols, min: range[0], max: range[1], rating, sale, inStock, sort });\n  }, [cats, cols, range, rating, sale, inStock, sort, onFiltersChange]);\n\n  // Close the open menu on Escape or a click outside the bar.\n  React.useEffect(() => {\n    if (!menu) return;\n    const onKey = (e: KeyboardEvent) => e.key === \"Escape\" && setMenu(null);\n    const onDown = (e: PointerEvent) => !barRef.current?.contains(e.target as Node) && setMenu(null);\n    window.addEventListener(\"keydown\", onKey);\n    window.addEventListener(\"pointerdown\", onDown);\n    return () => {\n      window.removeEventListener(\"keydown\", onKey);\n      window.removeEventListener(\"pointerdown\", onDown);\n    };\n  }, [menu]);\n\n  const pass = (x: FilterBarProduct, skip?: string) =>\n    (skip === \"cat\" || !cats.length || cats.includes(x.category)) &&\n    (skip === \"col\" || !cols.length || cols.includes(x.color)) &&\n    x.price >= range[0] &&\n    (range[1] >= PRICE_MAX || x.price <= range[1]) &&\n    x.rating >= rating &&\n    (!sale || !!x.was) &&\n    (!inStock || x.inStock);\n  const list = products.filter((x) => pass(x)).sort((a, b) => (sort === \"price-asc\" ? a.price - b.price : sort === \"price-desc\" ? b.price - a.price : sort === \"rating\" ? b.rating - a.rating : 0));\n  const priceSet = range[0] > 0 || range[1] < PRICE_MAX;\n  const chips = [\n    ...cats.map((c) => ({ k: `c-${c}`, label: c, clear: () => setCats((v) => v.filter((x) => x !== c)) })),\n    ...cols.map((c) => ({ k: `k-${c}`, label: c, clear: () => setCols((v) => v.filter((x) => x !== c)) })),\n    ...(priceSet ? [{ k: \"price\", label: `${money(range[0], currency)}–${range[1] >= PRICE_MAX ? `${money(PRICE_MAX, currency)}+` : money(range[1], currency)}`, clear: () => setRange([0, PRICE_MAX]) }] : []),\n    ...(rating ? [{ k: \"rating\", label: `${rating}★ & up`, clear: () => setRating(0) }] : []),\n    ...(sale ? [{ k: \"sale\", label: \"On sale\", clear: () => setSale(false) }] : []),\n    ...(inStock ? [{ k: \"stock\", label: \"In stock\", clear: () => setInStock(false) }] : []),\n  ];\n  const clearAll = () => {\n    setCats([]);\n    setCols([]);\n    setRange([0, PRICE_MAX]);\n    setRating(0);\n    setSale(false);\n    setInStock(false);\n  };\n\n  const focus = \"outline-none focus-visible:ring-2 focus-visible:ring-offset-2\";\n  const pill = cn(\"flex h-9 shrink-0 cursor-pointer items-center gap-1.5 rounded-full border px-3.5 text-[13px] font-medium whitespace-nowrap transition-colors\", focus);\n  const pillStyle = (on: boolean) => (on ? { background: p.buttonBg, color: p.buttonText, borderColor: p.buttonBg } : { background: \"transparent\", color: p.title, borderColor: p.line });\n  const menuBtn = (id: Exclude<MenuId, null>, label: string, count: number) => (\n    <button type=\"button\" aria-expanded={menu === id} aria-controls={`${uid}-${id}`} onClick={() => setMenu((m) => (m === id ? null : id))} className={pill} style={pillStyle(count > 0)}>\n      {label}\n      {count > 0 && (\n        <span className=\"flex h-[18px] min-w-[18px] items-center justify-center rounded-full px-1 text-[10.5px] font-bold\" style={{ background: p.accent, color: p.accentText }}>\n          {count}\n        </span>\n      )}\n      <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" aria-hidden=\"true\" className={cn(\"transition-transform\", menu === id && \"rotate-180\")}>\n        <path d=\"m6 9 6 6 6-6\" />\n      </svg>\n    </button>\n  );\n  const panel = (id: Exclude<MenuId, null>, children: React.ReactNode, align: \"left\" | \"right\" = \"left\") => (\n    <AnimatePresence>\n      {menu === id && (\n        <motion.div\n          id={`${uid}-${id}`}\n          role=\"dialog\"\n          aria-label={id}\n          initial={reduce ? false : { opacity: 0, y: -6 }}\n          animate={{ opacity: 1, y: 0 }}\n          exit={reduce ? undefined : { opacity: 0, y: -4 }}\n          transition={{ duration: 0.15 }}\n          className={cn(\"absolute top-[calc(100%+8px)] z-30 rounded-2xl border p-3 shadow-[0_20px_50px_rgba(0,0,0,0.4)] max-sm:inset-x-3 sm:w-[260px]\", align === \"right\" ? \"right-0\" : \"sm:left-0\")}\n          style={{ background: p.menu, borderColor: p.line }}\n        >\n          {children}\n        </motion.div>\n      )}\n    </AnimatePresence>\n  );\n\n  return (\n    <section aria-labelledby={`${uid}-h`} className={cn(\"relative w-full px-4 py-10 sm:px-8\", className)} style={{ background: p.bg, color: p.title, \"--tw-ring-color\": p.ring, \"--tw-ring-offset-color\": p.bg } as React.CSSProperties}>\n      <div className=\"mx-auto max-w-5xl\">\n        <h2 id={`${uid}-h`} className=\"m-0 text-[26px] font-semibold tracking-[-0.02em]\">\n          {title}\n        </h2>\n\n        {/* Bar */}\n        <div ref={barRef} className=\"sticky top-0 z-20 -mx-4 mt-5 border-y px-4 py-3 sm:mx-0 sm:rounded-2xl sm:border\" style={{ background: p.bar, borderColor: p.line }}>\n          <div className=\"flex items-center gap-2\">\n            <div className=\"flex min-w-0 flex-1 items-center gap-2 overflow-x-auto [scrollbar-width:none] sm:overflow-visible\" role=\"toolbar\" aria-label=\"Filters\">\n              <div className=\"sm:relative\">\n                {menuBtn(\"category\", \"Category\", cats.length)}\n                {panel(\n                  \"category\",\n                  <ul className=\"m-0 list-none p-0\">\n                    {categories.map((c) => {\n                      const n = products.filter((x) => x.category === c && pass(x, \"cat\")).length;\n                      return (\n                        <li key={c}>\n                          <label className=\"flex cursor-pointer items-center gap-3 rounded-lg px-2 py-2 text-[13.5px]\" style={{ color: n || cats.includes(c) ? p.title : p.muted }}>\n                            <input type=\"checkbox\" checked={cats.includes(c)} onChange={() => setCats((v) => toggle(v, c))} className=\"h-4 w-4\" style={{ accentColor: p.accent }} />\n                            <span className=\"flex-1\">{c}</span>\n                            <span className=\"text-[12px] tabular-nums\" style={{ color: p.muted }}>\n                              {n}\n                            </span>\n                          </label>\n                        </li>\n                      );\n                    })}\n                  </ul>,\n                )}\n              </div>\n              <div className=\"sm:relative\">\n                {menuBtn(\"price\", \"Price\", priceSet ? 1 : 0)}\n                {panel(\n                  \"price\",\n                  <div className=\"px-1 py-1\">\n                    <p className=\"m-0 flex justify-between text-[13px] tabular-nums\">\n                      <span>{money(range[0], currency)}</span>\n                      <span>{range[1] >= PRICE_MAX ? `${money(PRICE_MAX, currency)}+` : money(range[1], currency)}</span>\n                    </p>\n                    {([\"min\", \"max\"] as const).map((k, i) => (\n                      <label key={k} className=\"mt-3 block text-[12px]\" style={{ color: p.muted }}>\n                        {k === \"min\" ? \"Minimum\" : \"Maximum\"}\n                        <input\n                          type=\"range\"\n                          min={0}\n                          max={PRICE_MAX}\n                          step={10}\n                          value={range[i]}\n                          onChange={(e) => {\n                            const v = Number(e.target.value);\n                            setRange((r) => (i === 0 ? [Math.min(v, r[1] - 10), r[1]] : [r[0], Math.max(v, r[0] + 10)]));\n                          }}\n                          className=\"mt-1 w-full\"\n                          style={{ accentColor: p.accent }}\n                        />\n                      </label>\n                    ))}\n                    <div className=\"mt-3 flex gap-1.5\">\n                      {[\n                        [0, 50],\n                        [50, 100],\n                        [100, PRICE_MAX],\n                      ].map(([a, b]) => (\n                        <button key={a} type=\"button\" onClick={() => setRange([a, b])} className={cn(\"h-8 flex-1 cursor-pointer rounded-lg border text-[12px]\", focus)} style={pillStyle(range[0] === a && range[1] === b)}>\n                          {b >= PRICE_MAX ? `${money(a, currency)}+` : `${money(a, currency)}–${b}`}\n                        </button>\n                      ))}\n                    </div>\n                  </div>,\n                )}\n              </div>\n              <div className=\"sm:relative\">\n                {menuBtn(\"color\", \"Colour\", cols.length)}\n                {panel(\n                  \"color\",\n                  <div className=\"grid grid-cols-2 gap-1.5\">\n                    {Object.entries(colors).map(([name, hex]) => {\n                      const on = cols.includes(name);\n                      const n = products.filter((x) => x.color === name && pass(x, \"col\")).length;\n                      return (\n                        <button\n                          key={name}\n                          type=\"button\"\n                          aria-pressed={on}\n                          onClick={() => setCols((v) => toggle(v, name))}\n                          className={cn(\"flex h-10 cursor-pointer items-center gap-2 rounded-xl border px-2.5 text-[13px]\", focus)}\n                          style={{ borderColor: on ? p.title : p.line, background: on ? p.ghost : \"transparent\", color: p.title }}\n                        >\n                          <span className=\"h-4 w-4 rounded-full ring-1 ring-white/20\" style={{ background: hex }} aria-hidden=\"true\" />\n                          <span className=\"flex-1 text-left\">{name}</span>\n                          <span className=\"text-[11.5px]\" style={{ color: p.muted }}>\n                            {n}\n                          </span>\n                        </button>\n                      );\n                    })}\n                  </div>,\n                )}\n              </div>\n              <div className=\"sm:relative\">\n                {menuBtn(\"rating\", \"Rating\", rating ? 1 : 0)}\n                {panel(\n                  \"rating\",\n                  <div role=\"radiogroup\" aria-label=\"Minimum rating\" className=\"flex flex-col gap-0.5\">\n                    {[0, 4.5, 4.7].map((r) => (\n                      <button\n                        key={r}\n                        type=\"button\"\n                        role=\"radio\"\n                        aria-checked={rating === r}\n                        onClick={() => {\n                          setRating(r);\n                          setMenu(null);\n                        }}\n                        className={cn(\"flex cursor-pointer items-center justify-between rounded-lg border-0 px-2.5 py-2 text-left text-[13.5px]\", focus)}\n                        style={{ background: rating === r ? p.ghost : \"transparent\", color: p.title }}\n                      >\n                        {r ? (\n                          <span>\n                            <span style={{ color: p.star }}>★</span> {r} & up\n                          </span>\n                        ) : (\n                          \"Any rating\"\n                        )}\n                        <span className=\"text-[12px]\" style={{ color: p.muted }}>\n                          {products.filter((x) => x.rating >= r).length}\n                        </span>\n                      </button>\n                    ))}\n                  </div>,\n                )}\n              </div>\n              <span aria-hidden=\"true\" className=\"mx-1 h-5 w-px shrink-0\" style={{ background: p.line }} />\n              <button type=\"button\" aria-pressed={sale} onClick={() => setSale((v) => !v)} className={pill} style={pillStyle(sale)}>\n                On sale\n              </button>\n              <button type=\"button\" aria-pressed={inStock} onClick={() => setInStock((v) => !v)} className={pill} style={pillStyle(inStock)}>\n                In stock\n              </button>\n            </div>\n            <div className=\"relative shrink-0\">\n              <button\n                type=\"button\"\n                aria-expanded={menu === \"sort\"}\n                aria-controls={`${uid}-sort`}\n                onClick={() => setMenu((m) => (m === \"sort\" ? null : \"sort\"))}\n                className={cn(\"flex h-9 cursor-pointer items-center gap-1.5 rounded-full border-0 px-2 text-[13px]\", focus)}\n                style={{ background: \"transparent\", color: p.body }}\n              >\n                <span className=\"hidden sm:inline\">Sort:</span>\n                <span style={{ color: p.title }}>{SORTS.find((s) => s.id === sort)!.label}</span>\n                <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" aria-hidden=\"true\">\n                  <path d=\"m6 9 6 6 6-6\" />\n                </svg>\n              </button>\n              {panel(\n                \"sort\",\n                <div role=\"listbox\" aria-label=\"Sort by\" className=\"flex flex-col gap-0.5\">\n                  {SORTS.map((s) => (\n                    <button\n                      key={s.id}\n                      type=\"button\"\n                      role=\"option\"\n                      aria-selected={sort === s.id}\n                      onClick={() => {\n                        setSort(s.id);\n                        setMenu(null);\n                      }}\n                      className={cn(\"flex cursor-pointer items-center justify-between rounded-lg border-0 px-2.5 py-2 text-left text-[13.5px]\", focus)}\n                      style={{ background: sort === s.id ? p.ghost : \"transparent\", color: p.title }}\n                    >\n                      {s.label}\n                      {sort === s.id && <span style={{ color: p.accent }}>✓</span>}\n                    </button>\n                  ))}\n                </div>,\n                \"right\",\n              )}\n            </div>\n          </div>\n\n          <AnimatePresence initial={false}>\n            {chips.length > 0 && (\n              <motion.div initial={reduce ? false : { opacity: 0, height: 0 }} animate={{ opacity: 1, height: \"auto\" }} exit={reduce ? undefined : { opacity: 0, height: 0 }} className=\"overflow-hidden\">\n                <div className=\"flex flex-wrap items-center gap-1.5 pt-3\">\n                  <AnimatePresence initial={false}>\n                    {chips.map((c) => (\n                      <motion.button\n                        key={c.k}\n                        layout={!reduce}\n                        initial={reduce ? false : { opacity: 0, scale: 0.9 }}\n                        animate={{ opacity: 1, scale: 1 }}\n                        exit={reduce ? undefined : { opacity: 0, scale: 0.9 }}\n                        type=\"button\"\n                        onClick={c.clear}\n                        aria-label={`Remove ${c.label}`}\n                        className={cn(\"flex h-7 cursor-pointer items-center gap-1 rounded-full border-0 px-2.5 text-[12px]\", focus)}\n                        style={{ background: p.ghost, color: p.title }}\n                      >\n                        {c.label}\n                        <span aria-hidden=\"true\" style={{ color: p.muted }}>\n                          ×\n                        </span>\n                      </motion.button>\n                    ))}\n                  </AnimatePresence>\n                  <button type=\"button\" onClick={clearAll} className={cn(\"ml-1 cursor-pointer rounded border-0 bg-transparent p-0 text-[12px] underline underline-offset-4\", focus)} style={{ color: p.muted }}>\n                    Clear all\n                  </button>\n                </div>\n              </motion.div>\n            )}\n          </AnimatePresence>\n        </div>\n\n        <p className=\"m-0 mt-5 text-[13px]\" style={{ color: p.muted }} aria-live=\"polite\">\n          {list.length} of {products.length} products\n        </p>\n\n        {list.length ? (\n          <ul className=\"m-0 mt-3 grid list-none grid-cols-2 gap-3 p-0 sm:grid-cols-3 lg:grid-cols-4\">\n            <AnimatePresence initial={false}>\n              {list.map((x) => (\n                <motion.li key={x.id} layout={!reduce} initial={reduce ? false : { opacity: 0, scale: 0.96 }} animate={{ opacity: 1, scale: 1 }} exit={reduce ? undefined : { opacity: 0, scale: 0.96 }} transition={{ duration: 0.25 }} className=\"group\">\n                  <div className=\"relative aspect-square overflow-hidden rounded-2xl\" style={{ background: p.tile }}>\n                    {/* eslint-disable-next-line @next/next/no-img-element -- plain img keeps the block framework-agnostic */}\n                    <img src={x.image} alt={x.name} width={400} height={400} className={cn(\"h-full w-full object-contain p-4 transition-transform duration-500 group-hover:scale-[1.04]\", !x.inStock && \"opacity-50 grayscale\")} />\n                    {x.was && (\n                      <span className=\"absolute top-2.5 left-2.5 rounded-full px-2 py-0.5 text-[11px] font-semibold\" style={{ background: p.accent, color: p.accentText }}>\n                        −{Math.round((1 - x.price / x.was) * 100)}%\n                      </span>\n                    )}\n                    {!x.inStock && <span className=\"absolute top-2.5 left-2.5 rounded-full bg-black/70 px-2 py-0.5 text-[11px] font-semibold text-white\">Sold out</span>}\n                    {x.inStock && (\n                      <button\n                        type=\"button\"\n                        onClick={() => {\n                          onAdd?.(x);\n                          setAdded(x.id);\n                          setTimeout(() => setAdded((a) => (a === x.id ? null : a)), 1300);\n                        }}\n                        aria-label={`Add ${x.name} to cart`}\n                        className={cn(\"absolute right-2.5 bottom-2.5 flex h-9 cursor-pointer items-center justify-center rounded-full border-0 text-[13px] font-semibold shadow-md transition-all\", added === x.id ? \"w-auto px-3\" : \"w-9\", focus)}\n                        style={added === x.id ? { background: p.accent, color: p.accentText } : { background: \"#111111\", color: \"#FFFFFF\" }}\n                      >\n                        {added === x.id ? \"Added ✓\" : \"+\"}\n                      </button>\n                    )}\n                  </div>\n                  <p className=\"m-0 mt-2.5 truncate text-[14px] font-medium\">{x.name}</p>\n                  <p className=\"m-0 mt-0.5 flex items-center gap-2 text-[13px]\">\n                    <span className=\"font-semibold tabular-nums\">{money(x.price, currency)}</span>\n                    {x.was && (\n                      <span className=\"line-through\" style={{ color: p.muted }}>\n                        {money(x.was, currency)}\n                      </span>\n                    )}\n                    <span className=\"ml-auto text-[12px]\" style={{ color: p.muted }}>\n                      <span style={{ color: p.star }}>★</span> {x.rating}\n                    </span>\n                  </p>\n                </motion.li>\n              ))}\n            </AnimatePresence>\n          </ul>\n        ) : (\n          <div className=\"mt-6 rounded-2xl border px-6 py-14 text-center\" style={{ borderColor: p.line }}>\n            <p className=\"m-0 text-[16px] font-semibold\">No products match</p>\n            <button type=\"button\" onClick={clearAll} className={cn(\"mt-3 h-9 cursor-pointer rounded-full border-0 px-4 text-[13px] font-semibold\", focus)} style={{ background: p.buttonBg, color: p.buttonText }}>\n              Clear filters\n            </button>\n          </div>\n        )}\n      </div>\n    </section>\n  );\n}\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}