"use strict";

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

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

var template = function template(pluginContext) {
  return function (data, config) {
    var React = pluginContext.lib.React;
    var Row = pluginContext.layoutComponents.Row;
    var Field = pluginContext.recordComponents.Field;


    var workflowStateField = config.showTermListStateIcon ? React.createElement(Field, { name: "workflowState", flex: "0 0 32px" }) : null;

    return React.createElement(
      Field,
      { name: "document" },
      React.createElement(
        Row,
        null,
        React.createElement(Field, { name: "displayName" }),
        React.createElement(Field, { name: "source" })
      ),
      React.createElement(Field, { name: "description" }),
      React.createElement(
        Field,
        { name: "list-item", subpath: "ns2:abstract-common-list" },
        workflowStateField,
        React.createElement(Field, { name: "displayName" }),
        React.createElement(Field, { name: "description" }),
        React.createElement(Field, { name: "source" }),
        React.createElement(Field, { name: "sourcePage" }),
        React.createElement(Field, { name: "termStatus" })
      )
    );
  };
};

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