"use client";
import { jsx, jsxs } from "react/jsx-runtime";
import * as React from "react";
import { cn } from "@open-mercato/shared/lib/utils";
import {
  Alert,
  AlertDescription,
  AlertTitle
} from "./alert.js";
const Notification = React.forwardRef(
  ({
    status,
    style,
    avatar,
    title,
    description,
    timestamp,
    actions,
    dismissible = true,
    onDismiss,
    dismissAriaLabel,
    className,
    id
  }, ref) => {
    return /* @__PURE__ */ jsxs(
      Alert,
      {
        ref,
        status,
        style,
        size: "default",
        icon: avatar,
        dismissible,
        onDismiss,
        dismissAriaLabel,
        className,
        "data-slot": "notification",
        "data-notification-id": id,
        children: [
          (title || timestamp) && /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2", children: [
            title ? /* @__PURE__ */ jsx(AlertTitle, { className: "mb-0 flex-1 min-w-0", children: title }) : /* @__PURE__ */ jsx("span", { className: "flex-1" }),
            timestamp ? /* @__PURE__ */ jsx("span", { className: "shrink-0 text-xs leading-5 opacity-60", "data-slot": "notification-timestamp", children: timestamp }) : null
          ] }),
          description ? /* @__PURE__ */ jsx(AlertDescription, { className: cn("opacity-72", title && "mt-1"), "data-slot": "notification-description", children: description }) : null,
          actions ? /* @__PURE__ */ jsx(
            "div",
            {
              className: cn("flex flex-wrap items-center gap-2", (title || description) && "mt-2.5"),
              "data-slot": "notification-actions",
              children: actions
            }
          ) : null
        ]
      }
    );
  }
);
Notification.displayName = "Notification";
export {
  Notification
};
//# sourceMappingURL=notification.js.map
