/*! ratio-ui · design system for knowledge sharing · https://github.com/losol/ratio-ui · (c) 2026 Losol AS · MPL-2.0 */
import { cn } from "../../utils/cn.js";
import { forwardRef } from "react";
import { jsx } from "react/jsx-runtime";
//#region src/core/ActionButton/ActionButton.tsx
var SIZE_CLASSES = {
	sm: "h-6 min-w-6 px-2.5",
	md: "h-7 min-w-7 px-3",
	lg: "h-9 min-w-9 px-4"
};
var SUBTLE_VARIANT = "[--action-button-bg:var(--card)] [--action-button-bg-hover:var(--card-hover)]";
var SOLID_VARIANT = [
	"[--action-button-bg:var(--primary)]",
	"[--action-button-fg:var(--text-on-primary)]",
	"[--action-button-border:transparent]",
	"[--action-button-bg-hover:color-mix(in_oklch,var(--primary)_92%,black)]",
	"[--action-button-fg-hover:var(--text-on-primary)]"
].join(" ");
var ActionButton = forwardRef(function ActionButton({ ariaLabel, variant, size = "md", children, className, type = "button", testId, ...rest }, ref) {
	return /* @__PURE__ */ jsx("button", {
		ref,
		type,
		"aria-label": ariaLabel,
		className: cn("inline-flex items-center justify-center gap-1.5 shrink-0", "text-sm leading-none whitespace-nowrap cursor-pointer", "rounded-[var(--action-button-radius,6px)]", "bg-(--action-button-bg) text-(--action-button-fg) border border-(--action-button-border)", "transition-colors duration-150 ease-out", "enabled:hover:bg-(--action-button-bg-hover) enabled:hover:text-(--action-button-fg-hover)", "enabled:active:scale-95", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--focus-ring)", "disabled:opacity-40 disabled:cursor-not-allowed", SIZE_CLASSES[size], "has-[>svg:only-child]:px-0", variant === "subtle" && SUBTLE_VARIANT, variant === "solid" && SOLID_VARIANT, className),
		"data-testid": testId,
		...rest,
		children
	});
});
ActionButton.displayName = "ActionButton";
//#endregion
export { ActionButton };

//# sourceMappingURL=ActionButton.js.map