'use strict';

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

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

var _cspaceRefname = require('cspace-refname');

var _formatHelpers = require('../../../helpers/formatHelpers');

exports.default = {
  default: [{
    name: 'docNumber',
    messages: (0, _reactIntl.defineMessages)({
      label: {
        'id': 'column.all.default.docNumber',
        'defaultMessage': 'Record'
      }
    }),
    // The value -might- be a refname.
    // FIXME: It could also be an option list value. How to tell?
    formatValue: function formatValue(value) {
      return (0, _cspaceRefname.getDisplayName)(value) || value;
    },
    width: 200
  }, {
    name: 'docName',
    messages: (0, _reactIntl.defineMessages)({
      label: {
        'id': 'column.all.default.docName',
        'defaultMessage': 'Summary'
      }
    }),
    // The value -might- be a refname.
    // FIXME: It could also be an option list value. How to tell?
    formatValue: function formatValue(value) {
      return (0, _cspaceRefname.getDisplayName)(value) || value;
    },
    width: 300
  }, {
    name: 'docType',
    messages: (0, _reactIntl.defineMessages)({
      label: {
        'id': 'column.all.default.docType',
        'defaultMessage': 'Type'
      }
    }),
    formatValue: function formatValue(value, formatterContext) {
      return (0, _formatHelpers.formatServiceObjectName)(value, formatterContext);
    },
    width: 150
  }, {
    name: 'updatedAt',
    messages: (0, _reactIntl.defineMessages)({
      label: {
        'id': 'column.all.default.updatedAt',
        'defaultMessage': 'Updated'
      }
    }),
    formatValue: _formatHelpers.formatTimestamp,
    sortBy: 'collectionspace_core:updatedAt',
    width: 150
  }]
};