"use client";
import { clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
import * as AvatarPrimitive from '@radix-ui/react-avatar';
import { jsxs, jsx } from 'react/jsx-runtime';

// lib/utils.ts
function cn(...inputs) {
  return twMerge(clsx(inputs));
}
function Avatar({
  className,
  ...props
}) {
  return /* @__PURE__ */ jsx(
    AvatarPrimitive.Root,
    {
      "data-slot": "avatar",
      className: cn(
        "relative flex size-8 shrink-0 overflow-hidden rounded-full",
        className
      ),
      ...props
    }
  );
}
function AvatarImage({
  className,
  ...props
}) {
  return /* @__PURE__ */ jsx(
    AvatarPrimitive.Image,
    {
      "data-slot": "avatar-image",
      className: cn("aspect-square size-full", className),
      ...props
    }
  );
}
function AvatarFallback({
  className,
  ...props
}) {
  return /* @__PURE__ */ jsx(
    AvatarPrimitive.Fallback,
    {
      "data-slot": "avatar-fallback",
      className: cn(
        "bg-muted flex size-full items-center justify-center rounded-full",
        className
      ),
      ...props
    }
  );
}
function Card({ className, ...props }) {
  return /* @__PURE__ */ jsx(
    "div",
    {
      "data-slot": "card",
      className: cn(
        "bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
        className
      ),
      ...props
    }
  );
}
function CardContent({ className, ...props }) {
  return /* @__PURE__ */ jsx(
    "div",
    {
      "data-slot": "card-content",
      className: cn("px-6", className),
      ...props
    }
  );
}

// lib/blockBrandedIconsAndPlaceholders.ts
var blockBrandedIconsAndPlaceholders = {
  avatar1: "https://cdn.ing/assets/i/r/286239/ebm7o3j2kx48vw98emnwjaf5qvl6/avatar-1.webp",
  avatar2: "https://cdn.ing/assets/i/r/286240/vgf3rrkwn0769pfdtpal60uo5vpw/avatar-2.webp",
  avatar3: "https://cdn.ing/assets/i/r/286241/05vbqt3lls0q974r8fv4zn0njllq/avatar-3.webp",
  avatar4: "https://cdn.ing/assets/i/r/286242/y0zkazxawxrl3twwkw63twf04pdt/avatar-4.webp",
  avatar5: "https://cdn.ing/assets/i/r/286243/alziyfoo570m3vade3usufzlzj6x/avatar-5.webp",
  avatar6: "https://cdn.ing/assets/i/r/286244/t7u1jpe1phm0fvmh3ybh3flhfg6i/avatar-6.webp"};
var DEFAULT_TESTIMONIALS = [
  {
    id: "1",
    content: "This platform has completely transformed how we work. The efficiency gains have been remarkable.",
    author: {
      name: "Sarah Chen",
      role: "Product Manager",
      avatar: blockBrandedIconsAndPlaceholders.avatar1
    }
  },
  {
    id: "2",
    content: "The best investment we've made this year. Our team loves it and productivity is through the roof.",
    author: {
      name: "Michael Torres",
      role: "CEO",
      avatar: blockBrandedIconsAndPlaceholders.avatar2
    }
  },
  {
    id: "3",
    content: "Incredible support team and an even better product. Highly recommend to anyone looking to scale.",
    author: {
      name: "Emily Watson",
      role: "Operations Lead",
      avatar: blockBrandedIconsAndPlaceholders.avatar3
    }
  },
  {
    id: "4",
    content: "Simple, elegant, and powerful. Everything we needed in one package. A game-changer for our workflow.",
    author: {
      name: "David Kim",
      role: "CTO",
      avatar: blockBrandedIconsAndPlaceholders.avatar4
    }
  },
  {
    id: "5",
    content: "We've tried many solutions, but this one stands out for its reliability and ease of use.",
    author: {
      name: "Lisa Park",
      role: "Engineering Manager",
      avatar: blockBrandedIconsAndPlaceholders.avatar5
    }
  },
  {
    id: "6",
    content: "The attention to detail is impressive. Every feature feels thoughtfully designed.",
    author: {
      name: "Alex Rivera",
      role: "Design Director",
      avatar: blockBrandedIconsAndPlaceholders.avatar6
    }
  }
];
var speedMap = {
  slow: "60s",
  normal: "40s",
  fast: "20s"
};
function TestimonialsMarquee({
  testimonials = DEFAULT_TESTIMONIALS,
  title = "What Our Customers Say",
  subtitle = "Join thousands of satisfied users",
  speed = "normal",
  pauseOnHover = true,
  className
}) {
  const duplicatedTestimonials = [...testimonials, ...testimonials];
  return /* @__PURE__ */ jsxs("section", { className: cn("py-16 md:py-24 overflow-hidden", className), children: [
    /* @__PURE__ */ jsx("div", { className: "container mb-12", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-2xl text-center", children: [
      /* @__PURE__ */ jsx("h2", { className: "text-3xl font-semibold tracking-tight md:text-4xl", children: title }),
      /* @__PURE__ */ jsx("p", { className: "mt-4 text-lg text-muted-foreground", children: subtitle })
    ] }) }),
    /* @__PURE__ */ jsxs("div", { className: "relative", children: [
      /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute left-0 top-0 z-10 h-full w-24 bg-gradient-to-r from-background to-transparent" }),
      /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute right-0 top-0 z-10 h-full w-24 bg-gradient-to-l from-background to-transparent" }),
      /* @__PURE__ */ jsx(
        "div",
        {
          className: cn(
            "flex gap-4",
            pauseOnHover && "[&:hover_.marquee-content]:pause"
          ),
          children: /* @__PURE__ */ jsx(
            "div",
            {
              className: "marquee-content flex shrink-0 animate-marquee gap-4",
              style: {
                animationDuration: speedMap[speed]
              },
              children: duplicatedTestimonials.map((testimonial, index) => /* @__PURE__ */ jsx(
                Card,
                {
                  className: "w-80 shrink-0",
                  children: /* @__PURE__ */ jsxs(CardContent, { className: "p-6", children: [
                    /* @__PURE__ */ jsxs("p", { className: "mb-4 text-sm leading-relaxed", children: [
                      "\u201C",
                      testimonial.content,
                      "\u201D"
                    ] }),
                    /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
                      /* @__PURE__ */ jsxs(Avatar, { className: "size-9", children: [
                        /* @__PURE__ */ jsx(
                          AvatarImage,
                          {
                            src: testimonial.author.avatar,
                            alt: testimonial.author.name
                          }
                        ),
                        /* @__PURE__ */ jsx(AvatarFallback, { className: "text-xs", children: testimonial.author.name.split(" ").map((n) => n[0]).join("") })
                      ] }),
                      /* @__PURE__ */ jsxs("div", { children: [
                        /* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: testimonial.author.name }),
                        testimonial.author.role && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: testimonial.author.role })
                      ] })
                    ] })
                  ] })
                },
                `${testimonial.id}-${index}`
              ))
            }
          )
        }
      )
    ] }),
    /* @__PURE__ */ jsx("style", { children: `
        @keyframes marquee {
          from {
            transform: translateX(0);
          }
          to {
            transform: translateX(-50%);
          }
        }
        .animate-marquee {
          animation: marquee linear infinite;
        }
        .pause {
          animation-play-state: paused;
        }
      ` })
  ] });
}

export { TestimonialsMarquee };
//# sourceMappingURL=testimonials-marquee.js.map
//# sourceMappingURL=testimonials-marquee.js.map