import { j as jsxRuntimeExports, M as MathJax } from "./doenetml-BPsLSRHD.js";
function renderLabelWithLatex({
  label,
  labelHasLatex
}) {
  if (labelHasLatex) {
    return /* @__PURE__ */ jsxRuntimeExports.jsx(MathJax, { hideUntilTypeset: "first", inline: true, dynamic: true, children: label });
  }
  return label;
}
function accessibleLabelText({
  label,
  labelHasLatex,
  fallback
}) {
  const trimmed = label.trim();
  if (!trimmed) {
    return fallback;
  }
  return labelHasLatex ? fallback : trimmed;
}
export {
  accessibleLabelText as a,
  renderLabelWithLatex as r
};
