'use strict';

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

exports.default = function (pluginContext) {
  return function (cspaceDocument) {
    var getPart = pluginContext.recordDataHelpers.getPart;


    if (!cspaceDocument) {
      return '';
    }

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

    if (!common) {
      return '';
    }

    var valuationcontrolReferenceNumber = common.get('valuationcontrolRefNumber');
    var valueType = common.get('valueType');

    return [valuationcontrolReferenceNumber, valueType].filter(function (part) {
      return !!part;
    }).join(' – ');
  };
};