"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const index_esm = require("../../../tiny-svg/dist/index.esm.js");
function componentsToPath(elements) {
  return elements.join(",").replace(/,?([A-z]),?/g, "$1");
}
function toSVGPoints(points) {
  var result = "";
  for (var i = 0, p; p = points[i]; i++) {
    result += p.x + "," + p.y + " ";
  }
  return result;
}
function createLine(points, attrs) {
  var line = index_esm.create("polyline");
  index_esm.attr(line, { points: toSVGPoints(points) });
  if (attrs) {
    index_esm.attr(line, attrs);
  }
  return line;
}
function updateLine(gfx, points) {
  index_esm.attr(gfx, { points: toSVGPoints(points) });
  return gfx;
}
exports.componentsToPath = componentsToPath;
exports.createLine = createLine;
exports.toSVGPoints = toSVGPoints;
exports.updateLine = updateLine;
