"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Badge = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const StyleHelper_1 = require("../../../Utilities/Helpers/StyleHelper");
const AdaptableIconComponent_1 = require("../AdaptableIconComponent");
const Badge = (props) => {
    const { iconPosition = 'start', icon: iconProps } = props;
    const preparedBadgePosition = iconPosition.toLowerCase();
    const icon = iconProps && React.createElement(AdaptableIconComponent_1.AdaptableIconComponent, { icon: iconProps });
    const style = (0, StyleHelper_1.toStyle)(props.adaptableStyle);
    return (React.createElement("div", { className: "ab-Badge", style: { ...style, marginRight: props.gap } },
        preparedBadgePosition === 'start' && icon,
        props.children,
        preparedBadgePosition === 'end' && icon));
};
exports.Badge = Badge;
