"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,
        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: "placeTermGroupList" },
        React.createElement(
          Field,
          { name: "placeTermGroup" },
          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: "historicalStatus" }),
              React.createElement(Field, { name: "termLanguage" }),
              React.createElement(Field, { name: "termPrefForLang" })
            ),
            React.createElement(
              Row,
              null,
              React.createElement(Field, { name: "nameAbbrev" }),
              React.createElement(Field, { name: "nameNote" }),
              React.createElement(Field, { name: "nameDateGroup" })
            ),
            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(
        Row,
        null,
        React.createElement(Field, { name: "placeType" }),
        React.createElement(Field, { name: "placeSource" })
      ),
      React.createElement(
        Field,
        { name: "placeOwnerGroupList" },
        React.createElement(
          Field,
          { name: "placeOwnerGroup" },
          React.createElement(Field, { name: "owner" }),
          React.createElement(Field, { name: "ownershipDateGroup" }),
          React.createElement(Field, { name: "ownershipNote" })
        )
      ),
      React.createElement(Field, { name: "placeNote" }),
      extensions.address.form
    ),
    React.createElement(
      Panel,
      { name: "localityInfo", collapsible: true, collapsed: true },
      React.createElement(
        Row,
        null,
        React.createElement(Field, { name: "vCoordinates" }),
        React.createElement(Field, { name: "vLatitude" }),
        React.createElement(Field, { name: "vLongitude" }),
        React.createElement(Field, { name: "vCoordSys" }),
        React.createElement(Field, { name: "vSpatialReferenceSystem" })
      ),
      React.createElement(
        Row,
        null,
        React.createElement(Field, { name: "vElevation" }),
        React.createElement(Field, { name: "vDepth" }),
        React.createElement(Field, { name: "vDistanceAboveSurface" }),
        React.createElement(Field, { name: "vUnitofMeasure" })
      ),
      React.createElement(
        Row,
        null,
        React.createElement(
          Col,
          null,
          React.createElement(Field, { name: "minElevationInMeters" }),
          React.createElement(Field, { name: "maxElevationInMeters" })
        ),
        React.createElement(
          Col,
          null,
          React.createElement(Field, { name: "minDepthInMeters" }),
          React.createElement(Field, { name: "maxDepthInMeters" })
        ),
        React.createElement(
          Col,
          null,
          React.createElement(Field, { name: "minDistanceAboveSurfaceInMeters" }),
          React.createElement(Field, { name: "maxDistanceAboveSurfaceInMeters" })
        ),
        React.createElement(Col, null)
      ),
      React.createElement(
        Row,
        null,
        React.createElement(Field, { name: "vCoordSource" }),
        React.createElement(Field, { name: "vCoordSourceRefId" })
      )
    ),
    React.createElement(
      Panel,
      { name: "geoRefInfo", collapsible: true, collapsed: true },
      React.createElement(
        Field,
        { name: "placeGeoRefGroupList" },
        React.createElement(
          Field,
          { name: "placeGeoRefGroup" },
          React.createElement(
            Panel,
            null,
            React.createElement(
              Row,
              null,
              React.createElement(Field, { name: "decimalLatitude" }),
              React.createElement(Field, { name: "decimalLongitude" }),
              React.createElement(Field, { name: "geodeticDatum" }),
              React.createElement(Field, { name: "coordUncertaintyInMeters" }),
              React.createElement(Field, { name: "coordPrecision" })
            ),
            React.createElement(
              Row,
              null,
              React.createElement(Field, { name: "pointRadiusSpatialFit" }),
              React.createElement(Field, { name: "footprintWKT" }),
              React.createElement(Field, { name: "footprintSRS" }),
              React.createElement(Field, { name: "footprintSpatialFit" })
            ),
            React.createElement(
              Row,
              null,
              React.createElement(Field, { name: "geoReferencedBy" }),
              React.createElement(Field, { name: "geoRefDateGroup" }),
              React.createElement(Field, { name: "geoRefProtocol" }),
              React.createElement(Field, { name: "geoRefSource" }),
              React.createElement(Field, { name: "geoRefVerificationStatus" })
            ),
            React.createElement(
              Row,
              null,
              React.createElement(Field, { name: "geoRefRemarks" }),
              React.createElement(Field, { name: "geoRefPlaceName" })
            )
          )
        )
      )
    ),
    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.place.default.name",
      "defaultMessage": "Standard Template"
    }
  }),
  template: template(configContext)
});