import { Slot } from '@radix-ui/react-slot';
import { clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
import { buttonVariants } from '@page-speed/pressable';
export { buttonVariants } from '@page-speed/pressable';
import { jsx } from 'react/jsx-runtime';

// components/ui/button.tsx
function cn(...inputs) {
  return twMerge(clsx(inputs));
}
function Button({
  className,
  variant = "default",
  size = "default",
  asChild = false,
  ...props
}) {
  const Comp = asChild ? Slot : "button";
  return /* @__PURE__ */ jsx(
    Comp,
    {
      "data-slot": "button",
      "data-variant": variant,
      "data-size": size,
      className: cn(buttonVariants({ variant, size, className })),
      ...props
    }
  );
}

export { Button };
