"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const styles_1 = require("./styles");
const Badge = ({ id, children, onPress, accessibility, accessibilityLabel, testID, style = [{}], textStyle = [{}], iconStyle = [{}], disabled = false, iconTouchable = false, loading = false, contrast = false, flat = false, isEmoji = false, hasBorder = false, variant = 'primary', typographyVariant = 'md', rightIconName, leftIconName, ...rest }) => {
    return (<styles_1.Touchable id={id || accessibility} accessibility={accessibility} accessibilityLabel={accessibilityLabel || accessibility} testID={testID || id || accessibility} disabled={loading || disabled} onPress={onPress}>
      <styles_1.ButtonWrapper hasBorder={hasBorder} buttonVariant={variant} disabled={disabled} flat={flat} style={style} {...rest}>
        {loading && <styles_1.Loading contrast={contrast}/>}
        {!loading && (<>
            {!!leftIconName && (<styles_1.Icon accessibility="" name={leftIconName} buttonVariant={variant} style={iconStyle} leftIcon touchable={iconTouchable} isEmoji={isEmoji}/>)}
            <styles_1.TextButton style={textStyle} disabled={disabled} flat={flat} variant={typographyVariant} buttonVariant={variant}>
              {children}
            </styles_1.TextButton>
            {!!rightIconName && (<styles_1.Icon accessibility="" name={rightIconName} buttonVariant={variant} style={iconStyle} rightIcon touchable={iconTouchable} isEmoji={isEmoji}/>)}
          </>)}
      </styles_1.ButtonWrapper>
    </styles_1.Touchable>);
};
exports.default = Badge;
//# sourceMappingURL=index.js.map