/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
import { fromEntries } from "../tokens/utils/fromEntries.js";

//#region src/runtime/tooltipConfig.ts
const tooltipSizes = ["default"];
const placementMap = {
	top: "top",
	bottom: "bottom",
	start: "left",
	end: "right",
	"top-start": "top-start",
	"top-end": "top-end",
	"bottom-start": "bottom-start",
	"bottom-end": "bottom-end",
	"start-top": "left-start",
	"start-bottom": "left-end",
	"end-top": "right-start",
	"end-bottom": "right-end"
};
const configToTooltipConfigContext = ({ tooltip, scaleMode }) => {
	const borderRadius = fromEntries(tooltipSizes.map((s) => [s, scaleMode.medium.borderRadius[tooltip.variables[`size/${s}/svg`].borderRadius.rest.value]]));
	if (Object.values(borderRadius).some((b) => typeof b !== "number")) throw new Error("borderRadius is not a number");
	return {
		animationDuration: 200,
		borderRadius,
		placementMap,
		placement: "top"
	};
};

//#endregion
export { configToTooltipConfigContext };