{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "hero20",
  "title": "Split Carousel with Thumbnails",
  "description": "Two-column carousel with animated content transitions, thumbnail strip navigation, and vertical progress indicator. Perfect for product showcases and feature highlights.",
  "dependencies": [
    "clsx",
    "tailwind-merge",
    "lucide-react",
    "framer-motion"
  ],
  "registryDependencies": [
    "badge",
    "button"
  ],
  "files": [
    {
      "path": "registry/hero20/hero20.tsx",
      "content": "\"use client\";\n\nimport { AnimatePresence, motion, type Transition, type Variants } from \"framer-motion\";\nimport { ChevronLeft, ChevronRight } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useCallback, useEffect, useState } from \"react\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils\";\n\ntype TransitionType = \"fade\" | \"parallax\" | \"reveal\" | \"morphism\" | \"curtain\";\n\ninterface ButtonItem {\n  id: string;\n  label: string;\n  href?: string;\n  variant?: \"default\" | \"secondary\" | \"outline\" | \"ghost\" | \"link\" | \"destructive\";\n  icon?: React.ReactNode;\n}\n\ninterface HeroSlide {\n  id: string;\n  badge?: {\n    label: string;\n    variant?: \"default\" | \"secondary\" | \"outline\";\n  };\n  heading?: string;\n  description?: string;\n  image?: {\n    src: string;\n    alt: string;\n  };\n  buttons?: ButtonItem[];\n}\n\ninterface Hero20Props {\n  slides: HeroSlide[];\n  autoPlay?: boolean;\n  interval?: number;\n  transition?: TransitionType;\n  showThumbnails?: boolean;\n  showArrows?: boolean;\n  showProgress?: boolean;\n  className?: string;\n}\n\nexport const hero20Demo: Hero20Props = {\n  slides: [\n    {\n      id: \"slide-1\",\n      badge: { label: \"New Release\", variant: \"default\" },\n      heading: \"Design Without Limits\",\n      description:\n        \"Transform your creative vision into reality. Our platform empowers designers and developers to build stunning experiences without constraints.\",\n      image: {\n        src: \"https://images.unsplash.com/photo-1764009971892-6bf11e43f210?q=80&w=2670&auto=format&fit=crop\",\n        alt: \"Abstract colorful design\",\n      },\n      buttons: [{ id: \"btn-1\", label: \"Start Creating\", href: \"https://beste.co\" }],\n    },\n    {\n      id: \"slide-2\",\n      badge: { label: \"Featured\", variant: \"secondary\" },\n      heading: \"Collaborate in Real-time\",\n      description:\n        \"Work together seamlessly with your team. Share designs, gather feedback, and iterate faster than ever before.\",\n      image: {\n        src: \"https://images.unsplash.com/photo-1666585958614-ade385208fac?q=80&w=2670&auto=format&fit=crop\",\n        alt: \"Creative collaboration workspace\",\n      },\n      buttons: [{ id: \"btn-1\", label: \"Start Free Trial\", href: \"https://beste.co\" }],\n    },\n    {\n      id: \"slide-3\",\n      badge: { label: \"Coming Soon\", variant: \"default\" },\n      heading: \"AI-Powered Creativity\",\n      description:\n        \"Let artificial intelligence enhance your workflow. Generate ideas, optimize layouts, and push the boundaries of design.\",\n      image: {\n        src: \"https://images.unsplash.com/photo-1740393076705-69922a4cce76?q=80&w=2608&auto=format&fit=crop\",\n        alt: \"Futuristic AI interface\",\n      },\n      buttons: [{ id: \"btn-1\", label: \"Join Waitlist\", href: \"https://beste.co\" }],\n    },\n  ],\n  autoPlay: true,\n  interval: 5000,\n  transition: \"parallax\",\n  showThumbnails: true,\n  showArrows: true,\n  showProgress: true,\n};\n\nconst getSlideVariants = (transition: TransitionType): Variants => {\n  switch (transition) {\n    case \"parallax\":\n      return {\n        enter: (direction: number) => ({\n          x: direction > 0 ? \"30%\" : \"-30%\",\n          scale: 1.1,\n          opacity: 0,\n        }),\n        center: {\n          x: 0,\n          scale: 1,\n          opacity: 1,\n        },\n        exit: (direction: number) => ({\n          x: direction < 0 ? \"30%\" : \"-30%\",\n          scale: 0.95,\n          opacity: 0,\n        }),\n      };\n    case \"reveal\":\n      return {\n        enter: {\n          clipPath: \"polygon(0 0, 0 0, 0 100%, 0% 100%)\",\n          opacity: 1,\n        },\n        center: {\n          clipPath: \"polygon(0 0, 100% 0, 100% 100%, 0 100%)\",\n          opacity: 1,\n        },\n        exit: {\n          clipPath: \"polygon(100% 0, 100% 0, 100% 100%, 100% 100%)\",\n          opacity: 1,\n        },\n      };\n    case \"morphism\":\n      return {\n        enter: {\n          filter: \"blur(40px) saturate(0)\",\n          scale: 1.2,\n          opacity: 0,\n        },\n        center: {\n          filter: \"blur(0px) saturate(1)\",\n          scale: 1,\n          opacity: 1,\n        },\n        exit: {\n          filter: \"blur(40px) saturate(0)\",\n          scale: 0.9,\n          opacity: 0,\n        },\n      };\n    case \"curtain\":\n      return {\n        enter: (direction: number) => ({\n          y: direction > 0 ? \"100%\" : \"-100%\",\n          opacity: 0,\n        }),\n        center: {\n          y: 0,\n          opacity: 1,\n        },\n        exit: (direction: number) => ({\n          y: direction < 0 ? \"100%\" : \"-100%\",\n          opacity: 0,\n        }),\n      };\n    default: // fade\n      return {\n        enter: {\n          opacity: 0,\n          scale: 1.05,\n        },\n        center: {\n          opacity: 1,\n          scale: 1,\n        },\n        exit: {\n          opacity: 0,\n          scale: 0.95,\n        },\n      };\n  }\n};\n\nconst getTransitionConfig = (transition: TransitionType): Transition => {\n  switch (transition) {\n    case \"parallax\":\n      return {\n        x: { type: \"spring\", stiffness: 200, damping: 25 },\n        scale: { duration: 0.6 },\n        opacity: { duration: 0.4 },\n      };\n    case \"reveal\":\n      return {\n        clipPath: { duration: 0.8, ease: [0.76, 0, 0.24, 1] },\n      };\n    case \"morphism\":\n      return {\n        duration: 0.9,\n        ease: [0.32, 0.72, 0, 1],\n      };\n    case \"curtain\":\n      return {\n        y: { type: \"spring\", stiffness: 300, damping: 30 },\n        opacity: { duration: 0.3 },\n      };\n    default:\n      return {\n        duration: 0.7,\n        ease: [0.22, 1, 0.36, 1],\n      };\n  }\n};\n\nconst contentVariants: Variants = {\n  hidden: { opacity: 0, y: 30 },\n  visible: (custom: number) => ({\n    opacity: 1,\n    y: 0,\n    transition: {\n      delay: 0.2 + custom * 0.1,\n      duration: 0.6,\n      ease: [0.22, 1, 0.36, 1],\n    },\n  }),\n  exit: {\n    opacity: 0,\n    y: -20,\n    transition: { duration: 0.3 },\n  },\n};\n\nexport function Hero20({\n  slides,\n  autoPlay = true,\n  interval = 5000,\n  transition = \"parallax\",\n  showThumbnails = true,\n  showArrows = true,\n  showProgress = true,\n  className,\n}: Hero20Props) {\n  const [currentIndex, setCurrentIndex] = useState(0);\n  const [direction, setDirection] = useState(0);\n  const [isPaused, setIsPaused] = useState(false);\n\n  const slideCount = slides.length;\n  const currentSlide = slides[currentIndex];\n\n  const slideVariants = getSlideVariants(transition);\n  const transitionConfig = getTransitionConfig(transition);\n\n  const paginate = useCallback(\n    (newDirection: number) => {\n      setDirection(newDirection);\n      if (newDirection === 1) {\n        setCurrentIndex((prev) => (prev + 1) % slideCount);\n      } else {\n        setCurrentIndex((prev) => (prev - 1 + slideCount) % slideCount);\n      }\n    },\n    [slideCount]\n  );\n\n  const goToSlide = useCallback(\n    (index: number) => {\n      setDirection(index > currentIndex ? 1 : -1);\n      setCurrentIndex(index);\n    },\n    [currentIndex]\n  );\n\n  useEffect(() => {\n    if (!autoPlay || slideCount <= 1 || isPaused) return;\n\n    const timer = setInterval(() => {\n      setDirection(1);\n      setCurrentIndex((prev) => (prev + 1) % slideCount);\n    }, interval);\n\n    return () => clearInterval(timer);\n  }, [autoPlay, interval, slideCount, isPaused]);\n\n  if (!currentSlide || slideCount === 0) return null;\n\n  return (\n    <section\n      className={cn(\n        \"relative w-full lg:min-h-[600px] lg:h-screen overflow-hidden bg-background\",\n        className\n      )}\n      onMouseEnter={() => setIsPaused(true)}\n      onMouseLeave={() => setIsPaused(false)}\n    >\n      {/* Main Content Grid */}\n      <div className=\"relative lg:h-full mx-auto max-w-7xl px-4 md:px-6\">\n        <div className=\"grid grid-cols-1 lg:grid-cols-2 gap-8 lg:gap-12 lg:h-full lg:items-center py-12 lg:py-0\">\n          {/* Left Side - Content */}\n          <div className=\"relative z-10 order-2 lg:order-1\">\n            <AnimatePresence mode=\"wait\">\n              <motion.div\n                key={`content-${currentIndex}`}\n                initial=\"hidden\"\n                animate=\"visible\"\n                exit=\"exit\"\n                className=\"flex flex-col gap-6\"\n              >\n                {/* Badge */}\n                {currentSlide.badge && (\n                  <motion.div variants={contentVariants} custom={0}>\n                    <Badge variant={currentSlide.badge.variant ?? \"default\"} className=\"w-fit\">\n                      {currentSlide.badge.label}\n                    </Badge>\n                  </motion.div>\n                )}\n\n                {/* Heading */}\n                {currentSlide.heading && (\n                  <motion.h1\n                    variants={contentVariants}\n                    custom={1}\n                    className=\"text-4xl sm:text-5xl lg:text-6xl xl:text-7xl font-bold tracking-tight leading-[1.1] text-foreground\"\n                  >\n                    {currentSlide.heading}\n                  </motion.h1>\n                )}\n\n                {/* Description */}\n                {currentSlide.description && (\n                  <motion.p\n                    variants={contentVariants}\n                    custom={2}\n                    className=\"text-base sm:text-lg lg:text-xl max-w-lg leading-relaxed text-muted-foreground\"\n                  >\n                    {currentSlide.description}\n                  </motion.p>\n                )}\n\n                {/* Buttons */}\n                {currentSlide.buttons && currentSlide.buttons.length > 0 && (\n                  <motion.div\n                    variants={contentVariants}\n                    custom={3}\n                    className=\"flex flex-wrap gap-4 mt-2\"\n                  >\n                    {currentSlide.buttons.map((button) => (\n                      <Button\n                        key={button.id}\n                        variant={button.variant ?? \"default\"}\n                        asChild\n                        className={button.icon ? \"gap-2\" : undefined}\n                      >\n                        <Link href={button.href ?? \"#\"}>\n                          {button.label}\n                          {button.icon}\n                        </Link>\n                      </Button>\n                    ))}\n                  </motion.div>\n                )}\n              </motion.div>\n            </AnimatePresence>\n\n            {/* Slide Counter */}\n            <div className=\"hidden lg:flex items-center gap-4 mt-12\">\n              <span className=\"text-5xl font-bold text-muted-foreground/30\">\n                {String(currentIndex + 1).padStart(2, \"0\")}\n              </span>\n              <div className=\"w-16 h-[2px] bg-border\" />\n              <span className=\"text-lg text-muted-foreground\">\n                {String(slideCount).padStart(2, \"0\")}\n              </span>\n            </div>\n          </div>\n\n          {/* Right Side - Media */}\n          <div className=\"relative order-1 lg:order-2 h-[300px] sm:h-[400px] lg:h-[70%]\">\n            {/* Main Media Container */}\n            <div className=\"relative w-full h-full rounded-2xl lg:rounded-3xl overflow-hidden shadow-2xl\">\n              {/* Border Effect */}\n              <div className=\"absolute inset-0 rounded-2xl lg:rounded-3xl border z-10 pointer-events-none\" />\n\n              <AnimatePresence initial={false} custom={direction} mode=\"sync\">\n                <motion.div\n                  key={currentIndex}\n                  custom={direction}\n                  variants={slideVariants}\n                  initial=\"enter\"\n                  animate=\"center\"\n                  exit=\"exit\"\n                  transition={transitionConfig}\n                  className=\"absolute inset-0\"\n                >\n                  {currentSlide.image && (\n                    <img\n                      className=\"absolute inset-0 size-full object-cover\"\n                      src={currentSlide.image.src}\n                      alt={currentSlide.image.alt}\n                    />\n                  )}\n                  {/* Inner Shadow Overlay */}\n                  <div className=\"absolute inset-0 bg-black/10\" />\n                </motion.div>\n              </AnimatePresence>\n\n              {/* Navigation Arrows */}\n              {showArrows && slideCount > 1 && (\n                <div className=\"absolute inset-x-4 top-1/2 -translate-y-1/2 flex justify-between z-10 pointer-events-none\">\n                  <button\n                    type=\"button\"\n                    onClick={() => paginate(-1)}\n                    className=\"size-10 lg:size-12 rounded-full bg-background/80 backdrop-blur-md border flex items-center justify-center text-foreground hover:bg-background transition-all duration-300 pointer-events-auto group/hero20-prev\"\n                  >\n                    <ChevronLeft className=\"size-5 group-hover/hero20-prev:-translate-x-0.5 transition-transform\" />\n                  </button>\n                  <button\n                    type=\"button\"\n                    onClick={() => paginate(1)}\n                    className=\"size-10 lg:size-12 rounded-full bg-background/80 backdrop-blur-md border flex items-center justify-center text-foreground hover:bg-background transition-all duration-300 pointer-events-auto group/hero20-next\"\n                  >\n                    <ChevronRight className=\"size-5 group-hover/hero20-next:translate-x-0.5 transition-transform\" />\n                  </button>\n                </div>\n              )}\n            </div>\n\n            {/* Thumbnail Strip */}\n            {showThumbnails && slideCount > 1 && (\n              <div className=\"absolute -bottom-4 left-1/2 -translate-x-1/2 lg:-bottom-6 flex items-center gap-2 lg:gap-3 p-2 rounded-xl bg-card backdrop-blur-xl border\">\n                {slides.map((slide, idx) => (\n                  <button\n                    type=\"button\"\n                    key={slide.id}\n                    onClick={() => goToSlide(idx)}\n                    className={cn(\n                      \"relative overflow-hidden rounded-lg transition-opacity duration-300 w-14 h-10 lg:w-16 lg:h-12\",\n                      idx === currentIndex\n                        ? \"opacity-100 ring-2 ring-primary\"\n                        : \"opacity-50 hover:opacity-80\"\n                    )}\n                  >\n                    {slide.image && (\n                      <img\n                        className=\"absolute inset-0 size-full object-cover\"\n                        src={slide.image.src}\n                        alt={slide.image.alt}\n                      />\n                    )}\n                    {idx === currentIndex && showProgress && (\n                      <motion.div\n                        className=\"absolute bottom-0 left-0 h-0.5 bg-primary\"\n                        initial={{ width: \"0%\" }}\n                        animate={{ width: isPaused ? undefined : \"100%\" }}\n                        transition={{\n                          duration: interval / 1000,\n                          ease: \"linear\",\n                        }}\n                        key={`progress-${currentIndex}`}\n                      />\n                    )}\n                  </button>\n                ))}\n              </div>\n            )}\n          </div>\n        </div>\n      </div>\n\n      {/* Vertical Progress Indicator */}\n      {showProgress && slideCount > 1 && (\n        <div className=\"hidden lg:flex absolute right-8 top-1/2 -translate-y-1/2 flex-col items-center gap-3 z-10\">\n          {slides.map((_, idx) => (\n            <button\n              type=\"button\"\n              key={idx}\n              onClick={() => goToSlide(idx)}\n              className=\"relative group\"\n            >\n              <div\n                className={cn(\n                  \"w-1 transition-all duration-500 rounded-full overflow-hidden\",\n                  idx === currentIndex ? \"h-12 bg-muted\" : \"h-6 bg-muted/50 hover:bg-muted\"\n                )}\n              >\n                {idx === currentIndex && (\n                  <motion.div\n                    className=\"w-full bg-primary\"\n                    initial={{ height: \"0%\" }}\n                    animate={{ height: isPaused ? undefined : \"100%\" }}\n                    transition={{\n                      duration: interval / 1000,\n                      ease: \"linear\",\n                    }}\n                    key={`vprogress-${currentIndex}`}\n                  />\n                )}\n              </div>\n            </button>\n          ))}\n        </div>\n      )}\n    </section>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/block/hero20.tsx"
    }
  ],
  "type": "registry:block"
}