'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

exports.default = pluginContext => data => {
  var _pluginContext$record = pluginContext.recordDataHelpers;
  const deepGet = _pluginContext$record.deepGet,
        getPart = _pluginContext$record.getPart;


  if (!data) {
    return '';
  }

  const common = getPart(data, 'locations_common');

  if (!common) {
    return '';
  }

  const displayName = deepGet(common, ['locTermGroupList', 'locTermGroup', 0, 'termDisplayName']);

  return displayName;
};