import { cs } from "../utils/styles.js";
import { useStyleConfig } from "../core/theme.js";
import vui from "../core/vui.js";
import { useNotificationContext } from "./context.js";
import { notificationStatusMapping } from "./consts.js";
import Icon from "../icon/icon.js";
import { jsx } from "react/jsx-runtime";

//#region src/notification/notificationIcon.tsx
/** Displays an icon based on the status within the Notification. */
const NotificationIcon = vui((props, ref) => {
	const { className, alignSelf, ...rest } = props;
	const mergedProps = {
		...useNotificationContext(),
		...props
	};
	const styles = useStyleConfig("Notification", useNotificationContext());
	const { status = "" } = mergedProps;
	const { iconProps } = notificationStatusMapping[status] ?? {};
	const marginTop = alignSelf === "center" ? "0" : "16px";
	return /* @__PURE__ */ jsx(Icon, {
		alignSelf,
		className: cs("vui-notificationIcon", className),
		ml: "16px",
		mt: marginTop,
		ref,
		size: "md",
		variant: "loading",
		...styles.icon,
		...iconProps,
		...rest
	});
});
NotificationIcon.displayName = "NotificationIcon";

//#endregion
export { NotificationIcon as default };
globalThis.__vuiVersion__ = "4.0.0"
//# sourceMappingURL=notificationIcon.js.map