/**
 * @license MIT
 * author: Cube Dev Team
 * @cube-dev/ui-kit v0.0.0-canary-2800b6c
 * Released under the MIT license.
 */

import { jsx as _jsx } from "react/jsx-runtime";
import { forwardRef } from 'react';
import { CONTAINER_STYLES, extractStyles, tasty, TEXT_STYLES, } from '../../../tasty/index.js';
import { useAction } from '../use-action.js';
const ActionElement = tasty({
    as: 'button',
    styles: {
        reset: 'button',
        position: 'relative',
        margin: 0,
        preset: 'inherit',
        border: 0,
        padding: 0,
        outline: 0,
        transition: 'theme',
        cursor: '$pointer',
        textDecoration: 'none',
        fill: '#clear',
    },
});
const STYLE_PROPS = [...CONTAINER_STYLES, ...TEXT_STYLES];
export 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 (_jsx(ActionElement, { "data-theme": theme, download: download, ...actionProps, styles: styles }));
});

        