'use strict';

var BaseStyle = require('primevue/base/style');
var utils = require('primevue/utils');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var BaseStyle__default = /*#__PURE__*/_interopDefaultLegacy(BaseStyle);

var classes = {
  root: function root(_ref) {
    var props = _ref.props,
      instance = _ref.instance;
    return ['p-badge p-component', {
      'p-badge-no-gutter': utils.ObjectUtils.isNotEmpty(props.value) && String(props.value).length === 1,
      'p-badge-dot': utils.ObjectUtils.isEmpty(props.value) && !instance.$slots["default"],
      'p-badge-lg': props.size === 'medium',
      'p-badge-xl': props.size === 'large',
      'p-badge-info': props.variant === 'info',
      'p-badge-success': props.variant === 'success',
      'p-badge-warning': props.variant === 'warning',
      'p-badge-danger': props.variant === 'danger'
    }];
  }
};
var BadgeStyle = BaseStyle__default["default"].extend({
  name: 'badge',
  classes: classes
});

module.exports = BadgeStyle;
