'use strict';

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

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

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

exports.default = {
  default: {
    docNumber: {
      // The value -might- be a refname.
      // FIXME: It could also be an option list value. How to tell?
      formatValue: value => (0, _formatHelpers.formatRefName)(value) || value,
      messages: (0, _reactIntl.defineMessages)({
        label: {
          'id': 'column.refs.default.docNumber',
          'defaultMessage': 'Record'
        }
      }),
      order: 10,
      width: 200
    },
    docName: {
      // The value -might- be a refname.
      // FIXME: It could also be an option list value. How to tell?
      formatValue: value => (0, _formatHelpers.formatRefName)(value) || value,
      messages: (0, _reactIntl.defineMessages)({
        label: {
          'id': 'column.refs.default.docName',
          'defaultMessage': 'Summary'
        }
      }),
      order: 20,
      width: 300
    },
    docType: {
      formatValue: _formatHelpers.formatServiceObjectName,
      messages: (0, _reactIntl.defineMessages)({
        label: {
          'id': 'column.refs.default.docType',
          'defaultMessage': 'Type'
        }
      }),
      order: 30,
      width: 150
    },
    sourceField: {
      formatValue: _formatHelpers.formatForeignSourceField,
      messages: (0, _reactIntl.defineMessages)({
        label: {
          'id': 'column.refs.default.sourceField',
          'defaultMessage': 'Field'
        }
      }),
      order: 40,
      width: 250
    }
  },
  narrow: {
    docNumber: {
      // The value -might- be a refname.
      // FIXME: It could also be an option list value. How to tell?
      formatValue: value => (0, _formatHelpers.formatRefName)(value) || value,
      messages: (0, _reactIntl.defineMessages)({
        label: {
          'id': 'column.refs.narrow.docNumber',
          'defaultMessage': 'Record'
        }
      }),
      order: 10,
      width: 200
    },
    docName: {
      // The value -might- be a refname.
      // FIXME: It could also be an option list value. How to tell?
      formatValue: value => (0, _formatHelpers.formatRefName)(value) || value,
      messages: (0, _reactIntl.defineMessages)({
        label: {
          'id': 'column.refs.narrow.docName',
          'defaultMessage': 'Summary'
        }
      }),
      order: 20,
      width: 300
    },
    docType: {
      formatValue: _formatHelpers.formatServiceObjectName,
      messages: (0, _reactIntl.defineMessages)({
        label: {
          'id': 'column.refs.narrow.docType',
          'defaultMessage': 'Type'
        }
      }),
      order: 30,
      width: 150
    },
    sourceField: {
      formatValue: _formatHelpers.formatForeignSourceField,
      messages: (0, _reactIntl.defineMessages)({
        label: {
          'id': 'column.refs.narrow.sourceField',
          'defaultMessage': 'Field'
        }
      }),
      order: 40,
      width: 250
    }
  }
};