import React, { useMemo } from 'react';
import classNames from 'classnames';
import "./index.less";
import { getClientName } from "./utils";
var ClientName = function ClientName(_ref) {
  var className = _ref.className,
    dataSource = _ref.dataSource,
    style = _ref.style;
  var name = useMemo(function () {
    return getClientName(dataSource);
  }, [dataSource]);
  if (!dataSource) return null;
  return /*#__PURE__*/React.createElement("div", {
    className: classNames('pisell-client-name', className),
    style: style || {}
  }, name);
};
export default ClientName;