"use strict";

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

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

const template = pluginContext => {
  const React = pluginContext.lib.React;
  var _pluginContext$layout = pluginContext.layoutComponents;
  const Panel = _pluginContext$layout.Panel,
        Row = _pluginContext$layout.Row,
        Cols = _pluginContext$layout.Cols,
        Col = _pluginContext$layout.Col;
  var _pluginContext$record = pluginContext.recordComponents;
  const Field = _pluginContext$record.Field,
        InputTable = _pluginContext$record.InputTable;


  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" })
            )
          )
        )
      ),
      React.createElement(
        Field,
        { name: "addrGroupList" },
        React.createElement(
          Field,
          { name: "addrGroup" },
          React.createElement(
            Panel,
            null,
            React.createElement(
              Cols,
              null,
              React.createElement(
                Col,
                null,
                React.createElement(Field, { name: "addressPlace1" }),
                React.createElement(Field, { name: "addressPlace2" }),
                React.createElement(Field, { name: "addressMunicipality" })
              ),
              React.createElement(
                Col,
                null,
                React.createElement(
                  Row,
                  null,
                  React.createElement(Field, { name: "addressStateOrProvince" }),
                  React.createElement(Field, { name: "addressPostCode" })
                ),
                React.createElement(Field, { name: "addressCountry" }),
                React.createElement(
                  Row,
                  null,
                  React.createElement(
                    Col,
                    null,
                    React.createElement(Field, { name: "addressType" })
                  ),
                  React.createElement(Col, null)
                )
              )
            )
          )
        )
      )
    ),
    React.createElement(
      Panel,
      { name: "hierarchy", collapsible: true, collapsed: true },
      React.createElement(Field, { name: "relation-list-item", subpath: "rel:relations-common-list" })
    )
  );
};

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