import React__default from 'react';
import LabelIcon from '../../Icons/labelIcon/index.js';
import { RequiredLabelWrapper, LabelContentWrapper } from './style.js';
import theme from '../../../Globals/theme.js';
import { ThemeProvider } from 'styled-components';
import globalStyle from '../../../Globals/global-styles.js';
import { RequiredTextWrapper } from '../../Typography/Paragraph/index.js';
import Tooltip from '../../Tooltip/Tooltip/index.js';

var RequiredLabel = function RequiredLabel(_ref) {
  var _ref$label = _ref.label,
      label = _ref$label === void 0 ? "" : _ref$label,
      info = _ref.info,
      _ref$isInfo = _ref.isInfo,
      isInfo = _ref$isInfo === void 0 ? false : _ref$isInfo,
      _ref$infoPlace = _ref.infoPlace,
      infoPlace = _ref$infoPlace === void 0 ? "bottom" : _ref$infoPlace,
      _ref$isRequired = _ref.isRequired,
      isRequired = _ref$isRequired === void 0 ? true : _ref$isRequired;
  return /*#__PURE__*/React__default.createElement(ThemeProvider, {
    theme: theme
  }, /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(globalStyle, null), /*#__PURE__*/React__default.createElement(RequiredLabelWrapper, null, /*#__PURE__*/React__default.createElement(LabelContentWrapper, null, label, isInfo && /*#__PURE__*/React__default.createElement(Tooltip, {
    title: info,
    placement: infoPlace
  }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(LabelIcon, null)))), isRequired && /*#__PURE__*/React__default.createElement(RequiredTextWrapper, null, "Required"))));
};

export { RequiredLabel as default };
//# sourceMappingURL=index.js.map
