'use strict';

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

exports.default = configContext => data => {
  const getPart = configContext.recordDataHelpers.getPart;


  if (!data) {
    return '';
  }

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

  if (!common) {
    return '';
  }

  const referenceNumber = common.get('referenceNumber');
  const title = common.get('title');

  return [referenceNumber, title].filter(part => !!part).join(' – ');
};