import { createPortal } from "react-dom"; import { ArrowUpRight, TriangleAlert, X } from "lucide-react"; import { Button } from "@/shared/ui/button"; import type { ScadaAlertAtmosphereState } from "../hooks/use-scada-alert-notices"; import type { WorkbenchAlert } from "../types"; export type ScadaAlertIntensity = "soft" | "standard" | "strong"; /** Event-lifetime viewport warning with an independently dismissible visual layer. */ export function ScadaAlertAtmosphere({ atmosphere, onDismiss, onOpen, intensity = "standard" }: { atmosphere: ScadaAlertAtmosphereState | null; onDismiss: (id: string) => void; onOpen: (alert: WorkbenchAlert) => void; intensity?: ScadaAlertIntensity; }) { if (!atmosphere) return null; const alert = atmosphere.alert; return createPortal(