"use client";
function f(n) {
  const i = [], t = String(n || "");
  let e = t.indexOf(","), s = 0, r = !1;
  for (; !r; ) {
    e === -1 && (e = t.length, r = !0);
    const o = t.slice(s, e).trim();
    (o || !r) && i.push(o), s = e + 1, e = t.indexOf(",", s);
  }
  return i;
}
function c(n, i) {
  const t = i || {};
  return (n[n.length - 1] === "" ? [...n, ""] : n).join(
    (t.padRight ? " " : "") + "," + (t.padLeft === !1 ? "" : " ")
  ).trim();
}
export {
  f as parse,
  c as stringify
};
