"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Icon = void 0;
const react_1 = __importDefault(require("react"));
const inlines_1 = require("inlines");
const varsUtilities_1 = require("../varsUtilities");
const Icon = ({ color = 'default', style, children, onClick, }) => {
    return (react_1.default.createElement(inlines_1.styled.div, { onClick: onClick, style: {
            display: 'flex',
            transition: 'transform 0.1s',
            cursor: onClick ? 'pointer' : 'inherit',
            borderRadius: onClick ? 4 : 0,
            '&:active': onClick
                ? {
                    transform: 'scale(0.95)',
                }
                : null,
            '&:hover': onClick
                ? {
                    color: (0, varsUtilities_1.color)('action', color === 'warning' || color === 'negative'
                        ? 'alert'
                        : 'primary', 'hover'),
                }
                : null,
            ...style,
        } }, children));
};
exports.Icon = Icon;
//# sourceMappingURL=Icon.js.map