"use client" import type { IAlertProps } from "./Alert.d" import type { JSX } from "react" import { Callout } from "@radix-ui/themes" import { AlertCircle, CheckCircle, Info, TriangleAlert } from "lucide-react" import { forwardRef } from "react" const variantMap = { info: { color: "blue", Icon: Info }, success: { color: "green", Icon: CheckCircle }, warning: { color: "yellow", Icon: TriangleAlert }, danger: { color: "red", Icon: AlertCircle }, } as const export const Alert = forwardRef( ({ variant = "info", children, ...props }, ref): JSX.Element => { const { color, Icon } = variantMap[variant] return ( {children} ) }, ) Alert.displayName = "Alert"