/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
import { fromEntries } from "../utils/dist/fromEntries.js";
//#region src/runtime/popoverConfig.ts
const popoverSizes = ["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 configToPopoverConfigContext = ({ popover, scaleMode }) => {
	return {
		defaultSize: "default",
		defaultVariant: "default",
		animationDuration: 200,
		borderRadius: fromEntries(popoverSizes.map((s) => [s, scaleMode.medium.borderRadius[popover.variables[`size/${s}/svgBase`].borderRadius.rest.value]])),
		placementMap,
		placement: "top",
		gap: fromEntries(popoverSizes.map((s) => [s, popover.variables[`size/${s}/contentWrapper`].gap.rest.value])),
		spacingHorizontal: fromEntries(popoverSizes.map((s) => [s, popover.variables[`size/${s}/contentWrapper`].spacingHorizontal.rest.value])),
		spacingVertical: fromEntries(popoverSizes.map((s) => [s, popover.variables[`size/${s}/contentWrapper`].spacingVertical.rest.value])),
		dismissButtonSpacing: fromEntries(popoverSizes.map((s) => [s, popover.variables[`size/${s}/closeIconContainer`].spacing.rest.value])),
		dismissIconSize: fromEntries(popoverSizes.map((s) => [s, scaleMode.medium.iconSizes[popover.variables[`size/${s}/closeIcon`].size.rest.value]]))
	};
};
//#endregion
export { configToPopoverConfigContext };
