"use client";
import { jsx, jsxs } from "react/jsx-runtime";
import { AlertCircle } from "lucide-react";
import { cn } from "@open-mercato/shared/lib/utils";
function ErrorMessage({ label, description, action, className, iconClassName }) {
  return /* @__PURE__ */ jsxs(
    "div",
    {
      className: cn(
        "flex items-start gap-3 rounded border border-destructive/50 bg-destructive/5 px-3 py-2 text-sm text-destructive",
        className
      ),
      role: "alert",
      children: [
        /* @__PURE__ */ jsx(AlertCircle, { className: cn("h-4 w-4 flex-none", iconClassName), "aria-hidden": true }),
        /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
          /* @__PURE__ */ jsx("p", { className: "leading-tight", children: label }),
          description ? /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: description }) : null,
          action ? /* @__PURE__ */ jsx("div", { className: "pt-1", children: action }) : null
        ] })
      ]
    }
  );
}
export {
  ErrorMessage
};
//# sourceMappingURL=ErrorMessage.js.map
