import React from 'react';
import { StyledTruncateTooltip, Text } from '../shared';
export var TextWrapper = function TextWrapper(_ref) {
  var children = _ref.children,
    _ref$weight = _ref.weight,
    weight = _ref$weight === void 0 ? 'bold' : _ref$weight,
    _ref$truncate = _ref.truncate,
    truncate = _ref$truncate === void 0 ? true : _ref$truncate,
    className = _ref.className;
  if (!truncate) {
    return React.createElement(Text, {
      className: className,
      weight: weight,
      color: function color(t) {
        return t.color.text;
      }
    }, children);
  }
  return React.createElement(StyledTruncateTooltip, {
    label: children
  }, React.createElement(Text, {
    className: className,
    weight: weight,
    color: function color(t) {
      return t.color.text;
    }
  }, children));
};