const getAriaLabelAttributes = (config) => {
	const { label, id, fallbackId, prefer = "id" } = config;
	if (id && prefer === "id") return { "aria-labelledby": id };
	if (label) return { "aria-label": label };
	if (id) return { "aria-labelledby": id };
	if (fallbackId) return { "aria-labelledby": fallbackId };
};
const getAriaDescribedBy = (props, errorTextUuid) => {
	const ariaDescribedBy = props["aria-describedby"];
	const errorTextId = !!(props.errorText || props.error && props.errorTextId) ? errorTextUuid : void 0;
	if (ariaDescribedBy && !errorTextId) return ariaDescribedBy;
	else if (!ariaDescribedBy && errorTextId) return errorTextId;
	else if (ariaDescribedBy && errorTextId) return ariaDescribedBy + " " + errorTextId;
};
export { getAriaLabelAttributes as n, getAriaDescribedBy as t };

//# sourceMappingURL=accessibility.js.map