import { jsx as _jsx } from "react/jsx-runtime";
import { useTheme } from "../../gravity-blocks/context/theme/index.js";
import { getThemedValue } from "../../utils/index.js";
import Icon from "../Icon/Icon.js";
function isIconSvg(icon) {
    return typeof icon === 'function';
}
const ContentIcon = ({ icon, className, qa, gravityIcon }) => {
    const theme = useTheme();
    const iconThemed = getThemedValue(icon, theme);
    const gravityIconThemed = getThemedValue(gravityIcon, theme);
    if (iconThemed && isIconSvg(iconThemed)) {
        const IconComponent = iconThemed;
        return (_jsx("div", { children: _jsx(IconComponent, { className: className }) }));
    }
    return _jsx(Icon, { icon: iconThemed, gravityIcon: gravityIconThemed, className: className, qa: qa });
};
export default ContentIcon;
//# sourceMappingURL=ContentIcon.js.map
