{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "integrations",
  "title": "integrations",
  "description": "An integrations component.",
  "dependencies": [
    "react",
    "motion",
    "lucide-react"
  ],
  "registryDependencies": [
    "utils"
  ],
  "files": [
    {
      "path": "registry/eldoraui/integrations.tsx",
      "content": "\"use client\"\n\nimport { useEffect, useId, useRef, useState } from \"react\"\nimport {\n  BarChart,\n  File,\n  Globe,\n  HeartHandshake,\n  Rss,\n  Shield,\n} from \"lucide-react\"\nimport { motion, useAnimation, useInView } from \"motion/react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Marquee } from \"@/registry/eldoraui/marquee\"\n\nconst tiles = [\n  {\n    icon: <HeartHandshake className=\"size-full\" />,\n    bg: (\n      <div className=\"pointer-events-none absolute top-1/2 left-1/2 size-1/2 -translate-x-1/2 -translate-y-1/2 overflow-visible rounded-full bg-gradient-to-r from-orange-600 via-rose-600 to-violet-600 opacity-70 blur-[20px]\"></div>\n    ),\n  },\n  {\n    icon: <Globe className=\"size-full\" />,\n    bg: (\n      <div className=\"pointer-events-none absolute top-1/2 left-1/2 size-1/2 -translate-x-1/2 -translate-y-1/2 overflow-visible rounded-full bg-gradient-to-r from-cyan-500 via-blue-500 to-indigo-500 opacity-70 blur-[20px]\"></div>\n    ),\n  },\n  {\n    icon: <File className=\"size-full\" />,\n    bg: (\n      <div className=\"pointer-events-none absolute top-1/2 left-1/2 size-1/2 -translate-x-1/2 -translate-y-1/2 overflow-visible rounded-full bg-gradient-to-r from-green-500 via-teal-500 to-emerald-600 opacity-70 blur-[20px]\"></div>\n    ),\n  },\n  {\n    icon: <Shield className=\"size-full\" />,\n    bg: (\n      <div className=\"pointer-events-none absolute top-1/2 left-1/2 size-1/2 -translate-x-1/2 -translate-y-1/2 overflow-visible rounded-full bg-gradient-to-r from-yellow-400 via-orange-500 to-yellow-600 opacity-70 blur-[20px]\"></div>\n    ),\n  },\n  {\n    icon: <Rss className=\"size-full\" />,\n    bg: (\n      <div className=\"pointer-events-none absolute top-1/2 left-1/2 size-1/2 -translate-x-1/2 -translate-y-1/2 overflow-visible rounded-full bg-gradient-to-r from-orange-600 via-rose-600 to-violet-600 opacity-70 blur-[20px]\"></div>\n    ),\n  },\n  {\n    icon: <BarChart className=\"size-full\" />,\n    bg: (\n      <div className=\"pointer-events-none absolute top-1/2 left-1/2 size-1/2 -translate-x-1/2 -translate-y-1/2 overflow-visible rounded-full bg-gradient-to-r from-cyan-600 via-cyan-500 to-teal-400 opacity-70 blur-[20px]\"></div>\n    ),\n  },\n]\n\nfunction shuffleArray<T>(array: T[]): T[] {\n  let currentIndex = array.length\n  let randomIndex\n  // While there remain elements to shuffle.\n  while (currentIndex !== 0) {\n    // Pick a remaining element.\n    randomIndex = Math.floor(Math.random() * currentIndex)\n    currentIndex--\n    // And swap it with the current element.\n    ;[array[currentIndex], array[randomIndex]] = [\n      array[randomIndex],\n      array[currentIndex],\n    ]\n  }\n  return array\n}\n\nfunction Card(card: { icon: React.ReactNode; bg: React.ReactNode }) {\n  const id = useId()\n  const controls = useAnimation()\n  const ref = useRef(null)\n  const inView = useInView(ref, { once: true })\n\n  useEffect(() => {\n    if (inView) {\n      controls.start({\n        opacity: 1,\n        transition: { delay: Math.random() * 2, ease: \"easeOut\", duration: 1 },\n      })\n    }\n  }, [controls, inView])\n\n  return (\n    <motion.div\n      key={id}\n      ref={ref}\n      initial={{ opacity: 0 }}\n      animate={controls}\n      className={cn(\n        \"relative size-20 cursor-pointer overflow-hidden rounded-2xl border p-4\",\n        // light styles\n        \"bg-white [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)]\",\n        // dark styles\n        \"transform-gpu dark:bg-transparent dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset] dark:[border:1px_solid_rgba(255,255,255,.1)]\"\n      )}\n    >\n      {card.icon}\n      {card.bg}\n    </motion.div>\n  )\n}\n\nexport default function Integrations() {\n  const [randomTiles1, setRandomTiles1] = useState<typeof tiles>([])\n  const [randomTiles2, setRandomTiles2] = useState<typeof tiles>([])\n  const [randomTiles3, setRandomTiles3] = useState<typeof tiles>([])\n  const [randomTiles4, setRandomTiles4] = useState<typeof tiles>([])\n\n  useEffect(() => {\n    if (typeof window !== \"undefined\") {\n      // Ensures this runs client-side\n      setRandomTiles1(shuffleArray([...tiles]))\n      setRandomTiles2(shuffleArray([...tiles]))\n      setRandomTiles3(shuffleArray([...tiles]))\n      setRandomTiles4(shuffleArray([...tiles]))\n    }\n  }, [])\n\n  return (\n    <section id=\"cta\">\n      <div className=\"container mx-auto px-4 py-12 md:px-8\">\n        <div className=\"flex w-full flex-col items-center justify-center\">\n          <div className=\"relative flex w-full flex-col items-center justify-center overflow-hidden\">\n            <Marquee\n              reverse\n              className=\"-delay-[200ms] [--duration:10s]\"\n              repeat={5}\n            >\n              {randomTiles1.map((review, idx) => (\n                <Card key={idx} {...review} />\n              ))}\n            </Marquee>\n            <Marquee reverse className=\"[--duration:25s]\" repeat={5}>\n              {randomTiles2.map((review, idx) => (\n                <Card key={idx} {...review} />\n              ))}\n            </Marquee>\n            <Marquee\n              reverse\n              className=\"-delay-[200ms] [--duration:20s]\"\n              repeat={5}\n            >\n              {randomTiles1.map((review, idx) => (\n                <Card key={idx} {...review} />\n              ))}\n            </Marquee>\n            <Marquee reverse className=\"[--duration:30s]\" repeat={5}>\n              {randomTiles2.map((review, idx) => (\n                <Card key={idx} {...review} />\n              ))}\n            </Marquee>\n            <Marquee\n              reverse\n              className=\"-delay-[200ms] [--duration:20s]\"\n              repeat={5}\n            >\n              {randomTiles3.map((review, idx) => (\n                <Card key={idx} {...review} />\n              ))}\n            </Marquee>\n            <Marquee reverse className=\"[--duration:30s]\" repeat={5}>\n              {randomTiles4.map((review, idx) => (\n                <Card key={idx} {...review} />\n              ))}\n            </Marquee>\n            <div className=\"absolute\">\n              <div className=\"bg-backtround dark:bg-background absolute inset-0 -z-10 rounded-full opacity-40 blur-xl\" />\n            </div>\n            <div className=\"to-backtround dark:to-background absolute inset-x-0 bottom-0 h-full bg-gradient-to-b from-transparent to-70%\" />\n          </div>\n        </div>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}