import { j as jsxRuntimeExports } from "./doenetml-cB_aZGJ5.js";
import React__default from "react";
import { u as useDoenetRenderer } from "./useDoenetRenderer-DN3Z9CW3.js";
const asList = React__default.memo(function AsList(props) {
  let { id, SVs, children } = useDoenetRenderer(props);
  if (SVs.hidden) {
    return null;
  }
  if (children.length === 0) {
    return /* @__PURE__ */ jsxRuntimeExports.jsx(React__default.Fragment, {}, id);
  }
  let withCommas = children.slice(1).reduce(
    (a, b) => [...a, ", ", b],
    [children[0]]
  );
  return /* @__PURE__ */ jsxRuntimeExports.jsx(React__default.Fragment, { children: withCommas }, id);
});
export {
  asList as default
};
