'use strict';

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

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


    if (!data) {
      return '';
    }

    var common = getPart(data, 'media_common');

    if (!common) {
      return '';
    }

    var identificationNumber = common.get('identificationNumber');
    var title = common.get('title');

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