"use strict";

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

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

const template = configContext => {
  const React = configContext.lib.React;
  var _configContext$layout = configContext.layoutComponents;
  const Col = _configContext$layout.Col,
        Cols = _configContext$layout.Cols,
        Panel = _configContext$layout.Panel,
        Row = _configContext$layout.Row;
  var _configContext$record = configContext.recordComponents;
  const Field = _configContext$record.Field,
        Subrecord = _configContext$record.Subrecord;
  const extensions = configContext.config.extensions;


  return React.createElement(
    Field,
    { name: "document" },
    React.createElement(
      Panel,
      { name: "media", collapsible: true },
      React.createElement(
        Row,
        null,
        React.createElement(Field, { name: "identificationNumber" }),
        React.createElement(Field, { name: "title" })
      ),
      React.createElement(
        Panel,
        { name: "file", collapsible: true },
        React.createElement(Subrecord, { name: "blob", showDetachButton: true })
      ),
      React.createElement(Field, { name: "externalUrl" }),
      extensions.dimension.form,
      React.createElement(
        Cols,
        null,
        React.createElement(
          Col,
          null,
          React.createElement(Field, { name: "contributor" }),
          React.createElement(Field, { name: "creator" }),
          React.createElement(
            Field,
            { name: "languageList" },
            React.createElement(Field, { name: "language" })
          ),
          React.createElement(Field, { name: "publisher" }),
          React.createElement(
            Field,
            { name: "relationList" },
            React.createElement(Field, { name: "relation" })
          ),
          React.createElement(Field, { name: "copyrightStatement" })
        ),
        React.createElement(
          Col,
          null,
          React.createElement(
            Field,
            { name: "typeList" },
            React.createElement(Field, { name: "type" })
          ),
          React.createElement(Field, { name: "coverage" }),
          React.createElement(
            Field,
            { name: "dateGroupList" },
            React.createElement(Field, { name: "dateGroup" })
          ),
          React.createElement(Field, { name: "source" }),
          React.createElement(
            Field,
            { name: "subjectList" },
            React.createElement(Field, { name: "subject" })
          ),
          React.createElement(Field, { name: "rightsHolder" })
        )
      ),
      React.createElement(Field, { name: "description" })
    )
  );
};

exports.default = configContext => ({
  messages: (0, _reactIntl.defineMessages)({
    name: {
      "id": "form.media.default.name",
      "defaultMessage": "Standard Template"
    }
  }),
  template: template(configContext)
});