import { cn, surface } from "./cva.js";
import * as React from "react";
import { Slot } from "@radix-ui/react-slot";
import { jsx } from "react/jsx-runtime";
//#region src/Button.tsx
const buttonStateClasses = "inline-flex min-h-[var(--mod-touch-min)] items-center justify-center gap-2 bg-[var(--mod-color-accent-9)] text-[var(--mod-color-accent-contrast)] hover:bg-[var(--mod-color-accent-10)] active:bg-[var(--mod-color-accent-11)] focus-visible:outline-[var(--mod-focus-ring-width)] focus-visible:outline-[var(--mod-focus-ring-color)] focus-visible:outline-offset-[var(--mod-focus-ring-offset)] disabled:cursor-not-allowed disabled:opacity-[var(--mod-opacity-disabled)] aria-[busy=true]:cursor-progress aria-[busy=true]:opacity-[var(--mod-opacity-muted)]";
const Button = React.forwardRef(({ asChild, tone, radius, size, type, ...props }, ref) => {
	return /* @__PURE__ */ jsx(asChild ? Slot : "button", {
		ref,
		type: asChild ? type : type ?? "button",
		className: cn(surface({
			tone,
			radius,
			size
		}), buttonStateClasses),
		...props
	});
});
Button.displayName = "Button";
//#endregion
export { Button };
