"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 Panel = _configContext$layout.Panel,
        Row = _configContext$layout.Row,
        Cols = _configContext$layout.Cols,
        Col = _configContext$layout.Col;
  var _configContext$record = configContext.recordComponents;
  const Field = _configContext$record.Field,
        InputTable = _configContext$record.InputTable;
  const extensions = configContext.config.extensions;


  return React.createElement(
    Field,
    { name: "document" },
    React.createElement(
      Panel,
      { name: "info", collapsible: true },
      React.createElement(
        Field,
        { name: "workTermGroupList" },
        React.createElement(
          Field,
          { name: "workTermGroup" },
          React.createElement(
            Panel,
            null,
            React.createElement(
              Row,
              null,
              React.createElement(Field, { name: "termDisplayName" }),
              React.createElement(Field, { name: "termName" }),
              React.createElement(Field, { name: "termQualifier" }),
              React.createElement(Field, { name: "termStatus" })
            ),
            React.createElement(
              Row,
              null,
              React.createElement(Field, { name: "termType" }),
              React.createElement(Field, { name: "termFlag" }),
              React.createElement(Field, { name: "termLanguage" }),
              React.createElement(Field, { name: "termPrefForLang" })
            ),
            React.createElement(
              InputTable,
              { name: "termSource" },
              React.createElement(Field, { name: "termSource" }),
              React.createElement(Field, { name: "termSourceDetail" }),
              React.createElement(Field, { name: "termSourceID" }),
              React.createElement(Field, { name: "termSourceNote" })
            )
          )
        )
      ),
      React.createElement(
        Cols,
        null,
        React.createElement(
          Col,
          null,
          React.createElement(Field, { name: "workType" }),
          React.createElement(
            Field,
            { name: "workDateGroupList" },
            React.createElement(
              Field,
              { name: "workDateGroup" },
              React.createElement(Field, { name: "workDate" })
            )
          ),
          React.createElement(Field, { name: "workHistoryNote" })
        ),
        React.createElement(
          Col,
          null,
          React.createElement(
            Field,
            { name: "creatorGroupList" },
            React.createElement(
              Field,
              { name: "creatorGroup" },
              React.createElement(Field, { name: "creator" }),
              React.createElement(Field, { name: "creatorType" })
            )
          ),
          React.createElement(
            Field,
            { name: "publisherGroupList" },
            React.createElement(
              Field,
              { name: "publisherGroup" },
              React.createElement(Field, { name: "publisher" }),
              React.createElement(Field, { name: "publisherType" })
            )
          )
        )
      ),
      extensions.address.form
    ),
    React.createElement(
      Panel,
      { name: "hierarchy", collapsible: true, collapsed: true },
      React.createElement(Field, { name: "relation-list-item", subpath: "rel:relations-common-list" })
    )
  );
};

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