import { useUiTranslation as e } from "../../../../i18n/useUiTranslation.js";
import { footnotesSection as t, footnotesTitle as n } from "./MarkdownFootnotesSection.css.js";
import { MarkdownFootnoteDefinition as r } from "./MarkdownFootnoteDefinition.js";
import { Children as i, isValidElement as a } from "react";
import { jsx as o, jsxs as s } from "react/jsx-runtime";
//#region src/atomic/molecules/markdown/components/MarkdownFootnotesSection.tsx
var c = ({ children: c }) => {
	let { t: l } = e(), u = i.toArray(c).flatMap((e) => {
		if (a(e)) {
			let t = e.props;
			if (typeof t.id == "string") {
				let e = t.id;
				return /* @__PURE__ */ o(r, {
					id: e,
					label: e,
					children: t.children
				}, e);
			}
		}
		return [];
	});
	return u.length === 0 ? null : /* @__PURE__ */ s("section", {
		className: t,
		id: "footnotes",
		children: [/* @__PURE__ */ o("p", {
			className: n,
			children: l("markdown.footnotes.title")
		}), u]
	});
};
//#endregion
export { c as MarkdownFootnotesSection };

//# sourceMappingURL=MarkdownFootnotesSection.js.map