import React from 'react';
import { StyledTruncateTooltip, Text } from '../shared';
export var TextWrapper = function TextWrapper(_ref) {
  var className = _ref.className,
    _ref$truncate = _ref.truncate,
    truncate = _ref$truncate === void 0 ? true : _ref$truncate,
    weight = _ref.weight,
    children = _ref.children;
  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));
};