/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
"use client";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
const require_styles_styler = require("../../../styles/styler.cjs");
const require_components_HStack = require("../../HStack.cjs");
const require_components_client_Toast_UDSToastConfigProvider = require("./UDSToastConfigProvider.cjs");
const require_utils_isElevationAlias = require("../../../utils/isElevationAlias.cjs");
let react_jsx_runtime = require("react/jsx-runtime");
let lodash_isString_js = require("lodash/isString.js");
lodash_isString_js = require_runtime.__toESM(lodash_isString_js);
//#region src/components/client/Toast/ToastContainer.tsx
const typeMap = {
	default: "info",
	success: "success",
	error: "error",
	info: "info",
	warning: "warning"
};
const getToastClassName = (toastClassName) => (context) => {
	return require_styles_styler.cx(require_styles_styler.getStyles({
		position: "relative",
		alignItems: "center",
		display: "flex",
		className: "box-border touch-none z-0 w-full break-words mb-2 last:mb-0"
	}), (0, lodash_isString_js.default)(toastClassName) ? toastClassName : toastClassName?.(context));
};
const ToastContainer = ({ size: sizeProp, variant: variantProp, children, className, ...props }) => {
	const { size, variant, backgroundColor } = require_components_client_Toast_UDSToastConfigProvider.useToastConfig(sizeProp, variantProp);
	const bg = backgroundColor[variant];
	const isElevationBg = require_utils_isElevationAlias.isElevationAlias(bg);
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_HStack.HStack, {
		className: require_styles_styler.getStyles({
			toastVariantRoot: variant,
			toastSizeRoot: size,
			className: require_styles_styler.cx("w-full", className)
		}),
		alignItems: "center",
		justifyContent: "space-between",
		overflow: "hidden",
		position: "relative",
		backgroundColor: isElevationBg ? bg : void 0,
		...props,
		children
	});
};
ToastContainer.displayName = "ToastContainer";
//#endregion
exports.ToastContainer = ToastContainer;
exports.getToastClassName = getToastClassName;
exports.typeMap = typeMap;
