import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
import _createClass from "@babel/runtime/helpers/createClass";
import _inherits from "@babel/runtime/helpers/inherits";
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
var _excluded = ["children", "className", "fullWidth", "size"];

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Box from '../box';
import Icon from '../icon';
import cx from 'classnames';
import theme from './theme.css';
import { IconLockSmallFilled } from '@teamleader/ui-icons';
import { UITextBody, UITextSmall } from '../typography';
/** @type {React.ComponentType<any>} */

var MarketingStatusLabel = /*#__PURE__*/function (_Component) {
  _inherits(MarketingStatusLabel, _Component);

  var _super = _createSuper(MarketingStatusLabel);

  function MarketingStatusLabel() {
    _classCallCheck(this, MarketingStatusLabel);

    return _super.apply(this, arguments);
  }

  _createClass(MarketingStatusLabel, [{
    key: "render",
    value: function render() {
      var _this$props = this.props,
          children = _this$props.children,
          className = _this$props.className,
          fullWidth = _this$props.fullWidth,
          size = _this$props.size,
          others = _objectWithoutProperties(_this$props, _excluded);

      var classNames = cx(theme['wrapper'], theme["is-".concat(size)], className);
      var TextElement = size === 'small' ? UITextSmall : UITextBody;
      return /*#__PURE__*/React.createElement(Box, _extends({}, others, {
        alignItems: "center",
        display: fullWidth ? 'flex' : 'inline-flex',
        justifyContent: "center",
        className: classNames,
        paddingHorizontal: 2
      }), /*#__PURE__*/React.createElement(TextElement, {
        className: theme['text'],
        marginRight: 2
      }, children), /*#__PURE__*/React.createElement(Icon, {
        className: theme['icon']
      }, /*#__PURE__*/React.createElement(IconLockSmallFilled, null)));
    }
  }]);

  return MarketingStatusLabel;
}(Component);

MarketingStatusLabel.defaultProps = {
  fullWidth: false,
  size: 'medium'
};
export default MarketingStatusLabel;