import { __assign, __rest } from "tslib";
// @ts-nocheck
import './SocialButton.css';
import React from 'react';
import { cn } from '../../utils/bem';
import { forwardRefWithAs } from '../../utils/types/PropsWithAsAttributes';
import { usePropsHandler } from '../EventInterceptor/usePropsHandler';
export var cnSocialButton = cn('SocialButton');
export var SocialButton = forwardRefWithAs(function (props) {
    var _a = usePropsHandler(cnSocialButton(), props), icon = _a.icon, _b = _a.as, as = _b === void 0 ? 'button' : _b, otherProps = __rest(_a, ["icon", "as"]);
    var Tag = as;
    var Icon = icon;
    var componentProps = {
        rel: Tag === 'a' ? 'noreferrer noopener' : undefined,
        target: Tag === 'a' ? '_blank' : undefined
    };
    return (React.createElement(Tag, __assign({ className: cnSocialButton() }, otherProps, componentProps),
        React.createElement(Icon, { size: "xs" })));
});
