/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-af8d194 | Cube Dev Team */
import { tasty } from "../../../../tasty/tasty.js";
import { wrapIcon } from "../../../../icons/wrap-icon.js";
import { DangerIcon } from "../../../../icons/DangerIcon.js";
import { ExclamationIcon } from "../../../../icons/ExclamationIcon.js";
import { memo } from "react";
import { jsx } from "react/jsx-runtime";

//#region src/components/overlays/NewNotifications/NotificationView/NotificationIcon.tsx
const SuccessIcon = wrapIcon("SuccessIcon", /* @__PURE__ */ jsx("svg", {
	fill: "currentColor",
	viewBox: "0 0 16 16",
	xmlns: "http://www.w3.org/2000/svg",
	children: /* @__PURE__ */ jsx("path", { d: "m13.67 5.88-5.8 5.8a1.1 1.1 0 0 1-1.55 0l-3-3a1.1 1.1 0 0 1 1.56-1.55l2.21 2.21 5.03-5.02a1.1 1.1 0 0 1 1.55 1.56Z" })
}));
const IconContainer = tasty({ styles: {
	boxSizing: "border-box",
	display: "flex",
	alignSelf: "start",
	gridArea: "icon",
	minHeight: "3x",
	placeContent: "center"
} });
const IconPreset = tasty({ styles: {
	boxSizing: "border-box",
	display: "flex",
	fill: {
		"": "#warning-bg",
		attention: "#warning-bg",
		success: "#success-bg",
		danger: "#danger-bg"
	},
	color: {
		"": "#warning-text",
		attention: "#warning-text",
		success: "#success-text",
		danger: "#danger-text"
	},
	radius: "1r",
	width: "3x",
	height: "3x",
	padding: "0.5x",
	alignItems: "center",
	justifyContent: "center",
	"& svg": {
		width: "100%",
		height: "100%"
	}
} });
/**
* @internal This component is unstable and must not be used outside of `NotificationView`.
*/
const NotificationIcon = memo(function NotificationIcon(props) {
	const { icon, type } = props;
	return /* @__PURE__ */ jsx(IconContainer, { children: icon ? icon : /* @__PURE__ */ jsx(IconPreset, {
		mods: {
			attention: type === "attention",
			success: type === "success",
			danger: type === "danger"
		},
		children: iconsByType[type]
	}) });
});
const iconsByType = {
	attention: /* @__PURE__ */ jsx(ExclamationIcon, {}),
	success: /* @__PURE__ */ jsx(SuccessIcon, {}),
	danger: /* @__PURE__ */ jsx(DangerIcon, {})
};

//#endregion
export { NotificationIcon };
//# sourceMappingURL=NotificationIcon.js.map