"use client";
import { jsx, jsxs } from "react/jsx-runtime";
import { cn } from "@open-mercato/shared/lib/utils";
const floatingPositionStyles = {
  "bottom-right": { bottom: 24, right: 24 },
  "bottom-left": { bottom: 24, left: 24 },
  "top-right": { top: 24, right: 24 },
  "top-left": { top: 24, left: 24 }
};
function AiDot({ onClick, isActive, hasMessages, position, className }) {
  return /* @__PURE__ */ jsxs(
    "button",
    {
      type: "button",
      onClick,
      className: cn(
        "fixed z-sticky group",
        "w-14 h-14 rounded-full",
        "flex items-center justify-center",
        "cursor-pointer",
        "transition-transform duration-200 ease-out",
        "hover:scale-110 active:scale-95",
        "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
        className
      ),
      style: floatingPositionStyles[position],
      "aria-label": "Open AI Assistant",
      children: [
        /* @__PURE__ */ jsx(
          "div",
          {
            className: cn(
              "absolute inset-0 rounded-full",
              "bg-gradient-to-r from-violet-500/30 via-fuchsia-500/30 to-cyan-500/30",
              "blur-xl",
              isActive ? "animate-ai-glow-active" : "animate-ai-glow"
            )
          }
        ),
        /* @__PURE__ */ jsxs(
          "div",
          {
            className: cn(
              "relative w-12 h-12 rounded-full",
              "bg-gradient-to-br from-violet-600 via-fuchsia-500 to-cyan-400",
              "shadow-lg shadow-violet-500/25",
              isActive ? "animate-ai-pulse-active" : "animate-ai-pulse"
            ),
            children: [
              /* @__PURE__ */ jsx("div", { className: "absolute inset-1 rounded-full bg-gradient-to-br from-white/20 to-transparent" }),
              /* @__PURE__ */ jsx(
                "div",
                {
                  className: cn(
                    "absolute inset-0 rounded-full",
                    "bg-gradient-conic from-violet-600 via-fuchsia-500 via-cyan-400 to-violet-600",
                    "opacity-60",
                    "animate-ai-spin"
                  ),
                  style: { mixBlendMode: "overlay" }
                }
              ),
              /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx(
                "svg",
                {
                  width: "24",
                  height: "24",
                  viewBox: "0 0 24 24",
                  fill: "none",
                  className: "text-white drop-shadow-sm",
                  children: /* @__PURE__ */ jsx(
                    "path",
                    {
                      d: "M12 2L14.5 9.5L22 12L14.5 14.5L12 22L9.5 14.5L2 12L9.5 9.5L12 2Z",
                      fill: "currentColor",
                      className: cn(
                        "origin-center",
                        isActive ? "animate-ai-sparkle-active" : "animate-ai-sparkle"
                      )
                    }
                  )
                }
              ) })
            ]
          }
        ),
        hasMessages && /* @__PURE__ */ jsx(
          "div",
          {
            className: cn(
              "absolute top-1 right-1",
              "w-3 h-3 rounded-full",
              "bg-emerald-500 border-2 border-white",
              "shadow-sm",
              "animate-pulse"
            )
          }
        )
      ]
    }
  );
}
var AiDot_default = AiDot;
export {
  AiDot,
  AiDot_default as default
};
//# sourceMappingURL=AiDot.js.map
