import { jsx as e, jsxs as n } from "react/jsx-runtime";
import { CloseW700 as l } from "@material-symbols-svg/react-rounded/icons/close";
import { EmergencyW700 as a } from "@material-symbols-svg/react-rounded/icons/emergency";
import { ErrorFillW700 as u } from "@material-symbols-svg/react-rounded/icons/error";
import { VerifiedFillW700 as f } from "@material-symbols-svg/react-rounded/icons/verified";
import { useMemo as p } from "react";
import { cn as o } from "../utils/cn.js";
const j = ({
  variant: r,
  multiline: s,
  message: c,
  className: i,
  onDismiss: t
}) => {
  const m = p(() => {
    switch (r) {
      case "success":
        return /* @__PURE__ */ e(f, { size: 16 });
      case "error":
        return /* @__PURE__ */ e(u, { size: 16 });
      case "warn":
      default:
        return /* @__PURE__ */ e(a, { size: 16 });
    }
  }, [r]);
  return /* @__PURE__ */ n(
    "div",
    {
      className: o(
        "gap-sw-md relative flex items-center",
        {
          "text-sw-status-error": r === "error",
          "text-sw-status-warning": r === "warn",
          "text-sw-status-success": r === "success"
        },
        i
      ),
      children: [
        !s && m,
        /* @__PURE__ */ e(
          "span",
          {
            className: o("text-sw-label-sm", {
              "text-nowrap": !s
            }),
            children: c
          }
        ),
        t && /* @__PURE__ */ e(
          "div",
          {
            onClick: t,
            className: "ml-auto flex cursor-pointer items-center justify-center transition-all hover:scale-125",
            children: /* @__PURE__ */ e(l, { size: 16 })
          }
        )
      ]
    }
  );
};
export {
  j as Banner
};
//# sourceMappingURL=Banner.js.map
