'use strict';

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

var _reactIntl = require('react-intl');

exports.default = function (pluginContext) {
  var _pluginContext$format = pluginContext.formatHelpers,
      formatOption = _pluginContext$format.formatOption,
      formatRefNameAsVocabularyName = _pluginContext$format.formatRefNameAsVocabularyName,
      formatTimestamp = _pluginContext$format.formatTimestamp,
      formatWorkflowStateIcon = _pluginContext$format.formatWorkflowStateIcon;


  return {
    default: {
      workflowState: {
        flexGrow: 0,
        flexShrink: 0,
        formatValue: formatWorkflowStateIcon,
        order: 10,
        width: 32
      },
      termDisplayName: {
        messages: (0, _reactIntl.defineMessages)({
          label: {
            'id': 'column.location.default.termDisplayName',
            'defaultMessage': 'Display name'
          }
        }),
        order: 20,
        sortBy: 'locations_common:locTermGroupList/0/termDisplayName',
        width: 250
      },
      termStatus: {
        formatValue: function formatValue(data, formatterContext) {
          return formatOption('locationTermStatuses', data, formatterContext);
        },
        messages: (0, _reactIntl.defineMessages)({
          label: {
            'id': 'column.location.default.termStatus',
            'defaultMessage': 'Term status'
          }
        }),
        order: 30,
        sortBy: 'locations_common:locTermGroupList/0/termStatus',
        width: 250
      },
      vocabulary: {
        dataKey: 'refName',
        formatValue: function formatValue(value, formatterContext) {
          return formatRefNameAsVocabularyName(value, formatterContext);
        },
        messages: (0, _reactIntl.defineMessages)({
          label: {
            'id': 'column.location.default.vocabulary',
            'defaultMessage': 'Vocabulary'
          }
        }),
        order: 40,
        width: 150
      },
      updatedAt: {
        formatValue: formatTimestamp,
        messages: (0, _reactIntl.defineMessages)({
          label: {
            'id': 'column.location.search.updatedAt',
            'defaultMessage': 'Updated'
          }
        }),
        order: 50,
        sortBy: 'collectionspace_core:updatedAt',
        width: 150
      }
    }
  };
};