export var getClientName = function getClientName(dataSource) {
  if (!dataSource || typeof dataSource === 'string') {
    return dataSource;
  }
  var first_name = dataSource.first_name,
    last_name = dataSource.last_name,
    display_name = dataSource.display_name,
    nickname = dataSource.nickname;
  var finalName = '';
  if (display_name) {
    finalName = display_name;
  } else if (nickname) {
    finalName = nickname;
  } else if (first_name || last_name) {
    finalName = "".concat(first_name, " ").concat(last_name).trim();
  }
  return finalName;
};