{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "step-pager-base",
  "type": "registry:component",
  "title": "Step Pager (base)",
  "description": "Theme-ready base variant of An animated step pager that visually highlights the current step with smooth icon transitions..",
  "dependencies": [
    "lucide-react",
    "motion",
    "react-icons"
  ],
  "files": [
    {
      "path": "components/watermelon/step-pager.tsx",
      "type": "registry:component",
      "content": "import React, { useState } from 'react';\nimport { motion, AnimatePresence } from 'motion/react';\nimport { ChevronLeft, ChevronRight } from 'lucide-react';\nimport { BsMusicNoteList } from 'react-icons/bs';\nimport { HiOutlineAdjustments } from 'react-icons/hi';\nimport { MdFavorite } from 'react-icons/md';\nimport { RiBubbleChartFill } from 'react-icons/ri';\n\nexport interface StepItem {\n  id: number;\n  label: string;\n  icon: React.ElementType;\n}\n\nconst defaultItems: StepItem[] = [\n  { id: 1, label: 'Explore', icon: RiBubbleChartFill },\n  { id: 2, label: 'Curate', icon: MdFavorite },\n  { id: 3, label: 'Mix', icon: HiOutlineAdjustments },\n  { id: 4, label: 'Play', icon: BsMusicNoteList },\n];\n\ninterface StepPagerProps {\n  steps?: StepItem[];\n  initialStep?: number;\n}\n\nexport const StepPager: React.FC<StepPagerProps> = ({\n  steps = defaultItems,\n  initialStep = 0,\n}) => {\n  const [activeIndex, setActiveIndex] = useState(initialStep);\n\n  const nextStep = () => setActiveIndex((prev) => (prev + 1) % steps.length);\n  const prevStep = () =>\n    setActiveIndex((prev) => (prev - 1 + steps.length) % steps.length);\n\n  return (\n    <div className=\"theme-injected flex flex-col items-center gap-4 select-none\">\n      <div className=\"flex h-8 items-center justify-center\">\n        <AnimatedText\n          text={steps[activeIndex].label}\n          className=\"text-foreground text-[26px] font-extrabold tracking-normal\"\n          delayStep={0.03}\n        />\n      </div>\n\n      <div className=\"flex items-center gap-4\">\n        <button\n          title=\"left\"\n          onClick={prevStep}\n          className=\"bg-muted text-muted-foreground hover:bg-muted/50 flex h-14 w-14 cursor-pointer items-center justify-center rounded-lg transition-all duration-250 active:scale-95\"\n        >\n          <ChevronLeft size={26} strokeWidth={2.5} />\n        </button>\n\n        <div className=\"border-border bg-background relative flex h-16 min-w-[140px] items-center justify-center gap-1 rounded-lg border-2 px-4\">\n          {steps.map((step, index) => {\n            const isActive = index === activeIndex;\n            const Icon = step.icon;\n\n            return (\n              <div\n                key={step.id}\n                className=\"relative flex h-6 w-6 items-center justify-center\"\n              >\n                {isActive && (\n                  <motion.div\n                    layoutId=\"active-pill\"\n                    className=\"absolute inset-[-8px] z-0 rounded-lg bg-transparent\"\n                    transition={{\n                      type: 'spring',\n                      stiffness: 300,\n                      damping: 30,\n                    }}\n                  />\n                )}\n\n                <AnimatePresence mode=\"popLayout\">\n                  <motion.div\n                    key={isActive ? 'active' : 'inactive'}\n                    className=\"relative z-10 flex cursor-pointer items-center justify-center\"\n                    initial={{\n                      opacity: 0,\n                      filter: 'blur(4px)',\n                      scale: isActive ? 0 : 1,\n                    }}\n                    animate={{\n                      opacity: 1,\n                      filter: 'blur(0px)',\n                      scale: 1,\n                      color: isActive\n                        ? 'oklch(var(--foreground))'\n                        : 'oklch(var(--muted-foreground))',\n                    }}\n                    exit={{ opacity: 0, filter: 'blur(4px)', scale: 0 }}\n                    transition={{ duration: 0.3, ease: 'easeOut' }}\n                    onClick={() => setActiveIndex(index)}\n                  >\n                    {isActive ? (\n                      <Icon size={26} className=\"text-foreground\" />\n                    ) : (\n                      <div className=\"bg-muted-foreground/50 h-2.5 w-2.5 rounded-lg\" />\n                    )}\n                  </motion.div>\n                </AnimatePresence>\n              </div>\n            );\n          })}\n        </div>\n\n        <button\n          title=\"right\"\n          onClick={nextStep}\n          className=\"bg-muted text-muted-foreground hover:bg-muted/50 flex h-14 w-14 cursor-pointer items-center justify-center rounded-lg transition-all duration-250 active:scale-95\"\n        >\n          <ChevronRight size={26} strokeWidth={2.5} />\n        </button>\n      </div>\n    </div>\n  );\n};\n\nfunction AnimatedText({\n  text,\n  className,\n  delayStep = 0.014,\n}: {\n  text: string;\n  className?: string;\n  delayStep?: number;\n}) {\n  const chars = text.split('');\n\n  return (\n    <span className={className} style={{ display: 'inline-flex' }}>\n      <AnimatePresence mode=\"popLayout\">\n        <motion.span\n          key={text}\n          style={{ display: 'inline-flex', willChange: 'transform' }}\n        >\n          {chars.map((char, i) => (\n            <motion.span\n              key={i}\n              initial={{\n                y: 10,\n                opacity: 0,\n                scale: 0.5,\n                filter: 'blur(2px)',\n              }}\n              animate={{\n                y: 0,\n                opacity: 1,\n                scale: 1,\n                filter: 'blur(0px)',\n              }}\n              exit={{\n                y: -10,\n                opacity: 0,\n                scale: 0.5,\n                filter: 'blur(2px)',\n              }}\n              transition={{\n                type: 'spring',\n                stiffness: 240,\n                damping: 16,\n                mass: 1.2,\n                delay: i * delayStep,\n              }}\n              style={{\n                display: 'inline-block',\n                whiteSpace: char === ' ' ? 'pre' : undefined,\n              }}\n            >\n              {char}\n            </motion.span>\n          ))}\n        </motion.span>\n      </AnimatePresence>\n    </span>\n  );\n}\n"
    }
  ]
}
