/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-29d58ba | Cube Dev Team */
import { extractStyles } from "../../../tasty/utils/styles.js";
import { CONTAINER_STYLES, TEXT_STYLES } from "../../../tasty/styles/list.js";
import { tasty } from "../../../tasty/tasty.js";
import { useAction } from "../use-action.js";
import { forwardRef } from "react";
import { jsx } from "react/jsx-runtime";

//#region src/components/actions/Action/Action.tsx
const ActionElement = tasty({
	as: "button",
	styles: {
		recipe: "reset button",
		position: "relative",
		preset: "inherit",
		transition: "theme"
	}
});
const STYLE_PROPS = [...CONTAINER_STYLES, ...TEXT_STYLES];
const Action = forwardRef(function Action({ to, as, download, htmlType, label, theme, mods, onPress, ...props }, ref) {
	const { actionProps } = useAction({
		to,
		as,
		htmlType,
		label,
		onPress,
		mods,
		...props
	}, ref);
	const styles = extractStyles(props, STYLE_PROPS);
	return /* @__PURE__ */ jsx(ActionElement, {
		"data-theme": theme,
		download,
		...actionProps,
		styles
	});
});

//#endregion
export { Action };
//# sourceMappingURL=Action.js.map