{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "testimonial-section-3",
  "title": "Testimonial Section 3",
  "description": "Solace UI testimonial section block variation 3.",
  "dependencies": [
    "motion"
  ],
  "files": [
    {
      "path": "src/registry/blocks/testimonial-section/three/index.tsx",
      "content": "\"use client\";\r\n\r\nimport React, { useState, useEffect, useCallback, useMemo } from \"react\";\r\nimport { ArrowLeft, ArrowRight } from \"lucide-react\";\r\nimport { motion } from \"motion/react\";\r\nimport Image from \"next/image\";\r\nimport { cn } from \"@/lib/utils\";\r\n\r\nconst testimonials = [\r\n  {\r\n    id: \"1\",\r\n    name: \"Marcus Rodriguez\",\r\n    role: \"Product Lead\",\r\n    image: \"https://assets.solaceui.com/solaceui-member-one.png\",\r\n    quote:\r\n      \"The best investment we've made for our frontend architecture in years.\",\r\n  },\r\n  {\r\n    id: \"2\",\r\n    name: \"Sarah Chen\",\r\n    role: \"CEO of DataFlow\",\r\n    image: \"https://assets.solaceui.com/solaceui-member-five.png\",\r\n    quote:\r\n      \"SolaceUI transformed our design workflow. What used to take weeks now takes days.\",\r\n  },\r\n\r\n  {\r\n    id: \"3\",\r\n    name: \"Olivia Koe\",\r\n    role: \"Design Director\",\r\n    image: \"https://assets.solaceui.com/solaceui-member-six.png\",\r\n    quote:\r\n      \"Simply beautiful components that are easy to customize and integrate.\",\r\n  },\r\n  {\r\n    id: \"4\",\r\n    name: \"David Kim\",\r\n    role: \"Founder\",\r\n    image: \"https://assets.solaceui.com/solaceui-member-two.png\",\r\n    quote: \"Our development velocity has doubled since adopting SolaceUI.\",\r\n  },\r\n  {\r\n    id: \"5\",\r\n    name: \"Amara Okonkwo\",\r\n    role: \"CTO\",\r\n    image: \"https://assets.solaceui.com/solaceui-member-three.png\",\r\n    quote:\r\n      \"Accessibility and performance out of the box. Truly impressive work.\",\r\n  },\r\n];\r\n\r\nexport default function Testimonial3() {\r\n  const [currentIndex, setCurrentIndex] = useState(1); // Start with index 1 so 0 is left, 1 is center, 2 is right (conceptually)\r\n\r\n  const handleNext = useCallback(() => {\r\n    setCurrentIndex((prev) => (prev + 1) % testimonials.length);\r\n  }, []);\r\n\r\n  const handlePrev = useCallback(() => {\r\n    setCurrentIndex(\r\n      (prev) => (prev - 1 + testimonials.length) % testimonials.length,\r\n    );\r\n  }, []);\r\n\r\n  useEffect(() => {\r\n    const handleKeyDown = (e: KeyboardEvent) => {\r\n      if (e.key === \"ArrowLeft\") {\r\n        handlePrev();\r\n      } else if (e.key === \"ArrowRight\") {\r\n        handleNext();\r\n      }\r\n    };\r\n\r\n    window.addEventListener(\"keydown\", handleKeyDown);\r\n    return () => window.removeEventListener(\"keydown\", handleKeyDown);\r\n  }, [handleNext, handlePrev]);\r\n\r\n  const visibleItems = useMemo(() => {\r\n    const total = testimonials.length;\r\n    const leftIndex = (currentIndex - 1 + total) % total;\r\n    const centerIndex = currentIndex;\r\n    const rightIndex = (currentIndex + 1) % total;\r\n\r\n    return [\r\n      { ...testimonials[leftIndex], position: \"left\" },\r\n      { ...testimonials[centerIndex], position: \"center\" },\r\n      { ...testimonials[rightIndex], position: \"right\" },\r\n    ];\r\n  }, [currentIndex]);\r\n\r\n  return (\r\n    <section\r\n      className=\"w-full py-20 bg-background flex flex-col items-center justify-center overflow-hidden\"\r\n      style={{ \"--color-primary\": \"#003AF9\" } as React.CSSProperties}\r\n    >\r\n      <div className=\"text-center mb-12 space-y-2\">\r\n        <h2 className=\"text-4xl md:text-5xl font-bold tracking-tight text-neutral-900 dark:text-white\">\r\n          Trusted By The\r\n          <br />\r\n          Best People\r\n        </h2>\r\n      </div>\r\n\r\n      <div className=\"relative w-full max-w-7xl px-4 flex items-stretch justify-center\">\r\n        <div className=\"flex flex-row items-stretch justify-center w-full\">\r\n          {visibleItems.map((item, index) => {\r\n            const isCenter = item.position === \"center\";\r\n\r\n            return (\r\n              <React.Fragment key={item.id}>\r\n                {/* Render Gap before center and after center (so between left-center and center-right) */}\r\n                {index > 0 && (\r\n                  <div className=\"hidden md:block w-[10px] sm:w-[20px] relative shrink-0\">\r\n                    <div className=\"absolute inset-0 bg-[repeating-linear-gradient(315deg,currentColor_0,currentColor_1px,transparent_0,transparent_50%)] bg-[length:10px_10px] text-neutral-300 dark:text-neutral-700 opacity-50 h-full w-full\" />\r\n                  </div>\r\n                )}\r\n\r\n                <motion.div\r\n                  layout\r\n                  initial={{ opacity: 0, scale: 0.9 }}\r\n                  animate={{ opacity: 1, scale: 1 }}\r\n                  exit={{ opacity: 0, scale: 0.9 }}\r\n                  transition={{ duration: 0.5, type: \"spring\" }}\r\n                  style={{ willChange: \"transform, opacity\" }}\r\n                  className={cn(\r\n                    \"relative flex flex-col justify-between border p-8 w-full md:w-[300px] shrink-0 rounded-none overflow-hidden\",\r\n                    isCenter\r\n                      ? \"bg-(--color-primary) border-(--color-primary) text-white z-20\"\r\n                      : \"hidden md:flex bg-white dark:bg-neutral-950 border-neutral-300 dark:border-neutral-800 text-neutral-600 dark:text-neutral-300 z-0\",\r\n                  )}\r\n                >\r\n                  {/* Overlay for side divs */}\r\n                  {!isCenter && item.position === \"left\" && (\r\n                    <div className=\"absolute inset-0 bg-gradient-to-r from-white/90 via-white/40 to-transparent dark:from-black/90 dark:via-black/40 dark:to-transparent z-10 pointer-events-none transition-all duration-300\" />\r\n                  )}\r\n                  {!isCenter && item.position === \"right\" && (\r\n                    <div className=\"absolute inset-0 bg-gradient-to-l from-white/90 via-white/40 to-transparent dark:from-black/90 dark:via-black/40 dark:to-transparent z-10 pointer-events-none transition-all duration-300\" />\r\n                  )}\r\n\r\n                  <div\r\n                    className={cn(\r\n                      \"text-xl md:text-[1.6rem] font-medium mb-8\",\r\n                      !isCenter && \"blur-[1px] opacity-70\",\r\n                    )}\r\n                  >\r\n                    \"{item.quote}\"\r\n                  </div>\r\n\r\n                  <div className=\"flex items-center gap-4 mt-auto\">\r\n                    <div\r\n                      className={cn(\r\n                        \"relative w-12 h-12 overflow-hidden\",\r\n                        isCenter\r\n                          ? \"border-2 border-black\"\r\n                          : \"border-2 border-(--color-primary)\",\r\n                      )}\r\n                    >\r\n                      <Image\r\n                        src={item.image}\r\n                        alt={item.name}\r\n                        width={48}\r\n                        height={48}\r\n                        loading=\"lazy\"\r\n                        sizes=\"48px\"\r\n                        className=\"object-cover object-top\"\r\n                        unoptimized\r\n                      />\r\n                    </div>\r\n                    <div className=\"flex flex-col text-left\">\r\n                      <span\r\n                        className={cn(\r\n                          \"font-bold text-lg\",\r\n                          isCenter\r\n                            ? \"text-white\"\r\n                            : \"text-neutral-900 dark:text-white\",\r\n                        )}\r\n                      >\r\n                        {item.name}\r\n                      </span>\r\n                      <span\r\n                        className={cn(\r\n                          \"text-sm\",\r\n                          isCenter ? \"text-blue-100\" : \"text-neutral-500\",\r\n                        )}\r\n                      >\r\n                        {item.role}\r\n                      </span>\r\n                    </div>\r\n                  </div>\r\n                </motion.div>\r\n              </React.Fragment>\r\n            );\r\n          })}\r\n        </div>\r\n      </div>\r\n\r\n      {/* Navigation Actions */}\r\n      <div className=\"flex items-center gap-6 mt-12 bg-transparent\">\r\n        <button\r\n          onClick={handlePrev}\r\n          className=\"group p-2 rounded-full hover:bg-neutral-100 dark:hover:bg-neutral-800 transition-colors\"\r\n          aria-label=\"Previous testimonial\"\r\n        >\r\n          <ArrowLeft className=\"w-6 h-6 text-neutral-400 dark:text-neutral-400 group-hover:text-(--color-primary) transition-colors\" />\r\n        </button>\r\n        <button\r\n          onClick={handleNext}\r\n          className=\"group p-2 rounded-full hover:bg-neutral-100 dark:hover:bg-neutral-800 transition-colors\"\r\n          aria-label=\"Next testimonial\"\r\n        >\r\n          <ArrowRight className=\"w-6 h-6 text-neutral-400 dark:text-neutral-400 group-hover:text-(--color-primary) transition-colors\" />\r\n        </button>\r\n      </div>\r\n    </section>\r\n  );\r\n}\r\n",
      "type": "registry:component",
      "target": "components/testimonial-section-3.tsx"
    }
  ],
  "type": "registry:block"
}