/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-f1f3d22 | 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: {
		reset: "button",
		appearance: "none",
		touchAction: "manipulation",
		textDecoration: "none",
		position: "relative",
		margin: 0,
		preset: "inherit",
		border: 0,
		padding: 0,
		outline: 0,
		transition: "theme",
		cursor: "$pointer",
		fill: "#clear"
	}
});
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