"use strict";

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

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

var template = function template(pluginContext) {
  var React = pluginContext.lib.React;
  var _pluginContext$layout = pluginContext.layoutComponents,
      Col = _pluginContext$layout.Col,
      Row = _pluginContext$layout.Row;
  var _pluginContext$record = pluginContext.recordComponents,
      ContentViewer = _pluginContext$record.ContentViewer,
      Field = _pluginContext$record.Field;


  return React.createElement(
    Field,
    { name: "document" },
    React.createElement(
      Row,
      null,
      React.createElement(ContentViewer, null),
      React.createElement(
        Col,
        null,
        React.createElement(Field, { name: "name" }),
        React.createElement(
          Row,
          null,
          React.createElement(Field, { name: "mimeType" }),
          React.createElement(Field, { name: "length" }),
          React.createElement(Field, { name: "createdAt", subpath: "ns2:collectionspace_core" }),
          React.createElement(Field, { name: "updatedAt", subpath: "ns2:collectionspace_core" })
        )
      )
    )
  );
};

exports.default = function (pluginContext) {
  return {
    messages: (0, _reactIntl.defineMessages)({
      name: {
        "id": "form.blob.view.name",
        "defaultMessage": "View Template"
      }
    }),
    sortOrder: 1,
    template: template(pluginContext)
  };
};