import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { SoftToolTip } from '../../Tooltip';
import { SoftIcon, } from '../../Icon';
export class SoftBetaBadge extends PureComponent {
    render() {
        let { className, label, tooltipContent, tooltipPosition, title, iconType, ...rest } = this.props;
        const classes = classNames('softBetaBadge', {
            'softBetaBadge--iconOnly': iconType,
        }, className);
        let icon;
        if (iconType) {
            icon = (React.createElement(SoftIcon, { className: "softBetaBadge__icon", type: iconType, size: "m", "aria-hidden": "true" }));
        }
        if (tooltipContent) {
            return (React.createElement(SoftToolTip, { position: tooltipPosition, content: tooltipContent, title: title || label },
                React.createElement("span", Object.assign({ className: classes }, rest), icon || label)));
            return null;
        }
        else {
            return (React.createElement("span", Object.assign({ className: classes, title: title || label }, rest), icon || label));
        }
    }
}
SoftBetaBadge.defaultProps = {
    tooltipPosition: 'top',
};
// @ts-ignore
SoftBetaBadge.propTypes = {
    className: PropTypes.string,
    /**
     * One word label like "Beta" or "Lab"
     */
    label: PropTypes.node.isRequired,
    /**
     * Supply an icon type if the badge should just be an icon
     */
    // iconType: PropTypes.oneOf(ICON_TYPES),
    /**
     * Content for the tooltip
     */
    tooltipContent: PropTypes.node,
    /**
     * Custom position of the tooltip
     */
    tooltipPosition: PropTypes.string,
    /**
     * Optional title will be supplied as tooltip title or title attribute otherwise the label will be used
     */
    title: PropTypes.string,
};
//# sourceMappingURL=SoftBetaBadge.js.map