'use strict';

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

exports.default = function (pluginContext) {
  return function (cspaceDocument) {
    var _pluginContext$record = pluginContext.recordDataHelpers,
        deepGet = _pluginContext$record.deepGet,
        getPart = _pluginContext$record.getPart;


    if (!cspaceDocument) {
      return '';
    }

    var common = getPart(cspaceDocument, 'contacts_common');

    if (!common) {
      return '';
    }

    return deepGet(common, ['emailGroupList', 'emailGroup', 0, 'email']);
  };
};