/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b04eed0 | Cube Dev Team */
import { _Item } from "../../content/Item/Item.js";
import { getThemeIcon } from "./useToast.js";
import { tasty } from "@tenphi/tasty";
import { forwardRef } from "react";
import { jsx } from "react/jsx-runtime";

//#region src/components/overlays/Toast/ToastItem.tsx
const StyledItem = tasty(_Item, { styles: {
	shadow: "$shadow",
	transition: "theme, inset",
	pointerEvents: {
		"": "none",
		"has-actions": "auto"
	},
	Description: { preset: "t4" }
} });
const ToastItem = forwardRef(function ToastItem(props, ref) {
	const { title, description, theme, isLoading, icon: providedIcon, children, qa, ...itemProps } = props;
	const icon = getThemeIcon(theme, providedIcon, isLoading);
	const primaryContent = children ?? title ?? description;
	return /* @__PURE__ */ jsx(StyledItem, {
		ref,
		qa: qa ?? "Toast",
		type: "card",
		theme,
		icon,
		isLoading,
		isDisabled: false,
		description: children || title ? description : void 0,
		...itemProps,
		children: primaryContent
	});
});

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