"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/toConsumableArray"),r=require("@babel/runtime/helpers/slicedToArray");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=t(e),n=t(r),u=function(e){return e.map((function(e){var r=e.latitude;return[e.longitude,r]}))};exports.convertApiCoordsToGeoJSON=u,exports.convertDrawCoordsToApi=function(e){return e.map((function(e){var r=n.default(e,2),t=r[0];return{latitude:r[1],longitude:t}}))},exports.createPolygonGeoJSON=function(e){if(!e||e.length<3)return null;var r=u(e),t=r[0],n=r[r.length-1];return{type:"Feature",geometry:{type:"Polygon",coordinates:[t[0]===n[0]&&t[1]===n[1]?r:[].concat(o.default(r),[t])]},properties:{}}};
//# sourceMappingURL=polygonCoords.js.map
