import { generateId as e } from "./dom.js";
//#region src/internal/utils/a11y.ts
function t(e) {
	e._internals === void 0 && (e._internals = e.attachInternals());
}
function n(t, n) {
	t && n && (n.id = n.id ? n.id : e(), t.htmlFor = n.id);
}
function r(t, n) {
	t && n && (t.id = t.id ? t.id : e(), n.setAttribute("aria-labelledby", t.id));
}
function i(t, n) {
	if (t.length && n) {
		let r = t.map((t) => t.id = e()).join(" ");
		n.setAttribute("aria-describedby", r);
	}
}
function a(t, n) {
	t && (t.id = t.id?.length ? t.id : e(), n.setAttribute("list", t.id));
}
function o(t) {
	if (!t.find((e) => e?.name?.length)) {
		let n = e();
		t.forEach((e) => e.name = n);
	}
}
//#endregion
export { i as associateAriaDescribedBy, r as associateAriaLabel, o as associateControlGroup, a as associateDataList, n as associateLabel, t as attachInternals };

//# sourceMappingURL=a11y.js.map