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