import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["style"];
import React from 'react';
import { InvalidSvg } from './InvalidUnit';

var SvgUnit = function SvgUnit(value, props) {
  var style = props.style,
      other = _objectWithoutProperties(props, _excluded);

  if (value) return /*#__PURE__*/React.createElement("text", _extends({
    className: props.className
  }, other), /*#__PURE__*/React.createElement("tspan", {
    style: style
  }, value.before, " "), /*#__PURE__*/React.createElement("tspan", {
    style: style
  }, value.value), /*#__PURE__*/React.createElement("tspan", {
    style: style
  }, ' ', value.output ? value.output.default.after + '' : '', value.after));else return /*#__PURE__*/React.createElement(InvalidSvg, {
    className: props.className
  });
};

export default SvgUnit;