import { jsx as r, jsxs as l } from "react/jsx-runtime";
import { CloseW700 as m } 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: e,
  multiline: s,
  message: c,
  className: i,
  onDismiss: t
}) => {
  const n = p(() => {
    switch (e) {
      case "success":
        return /* @__PURE__ */ r(f, { size: 16 });
      case "error":
        return /* @__PURE__ */ r(u, { size: 16 });
      case "info":
        return null;
      case "warn":
      default:
        return /* @__PURE__ */ r(a, { size: 16 });
    }
  }, [e]);
  return /* @__PURE__ */ l(
    "div",
    {
      className: o(
        "gap-sw-md relative flex items-center",
        {
          "text-sw-status-error": e === "error",
          "text-sw-status-warning": e === "warn",
          "text-sw-status-success": e === "success",
          "text-sw-gray-200": e === "info"
        },
        i
      ),
      children: [
        !s && n,
        /* @__PURE__ */ r(
          "span",
          {
            className: o("text-sw-label-sm", {
              "text-nowrap": !s
            }),
            children: c
          }
        ),
        t && /* @__PURE__ */ r(
          "div",
          {
            onClick: t,
            className: "ml-auto flex cursor-pointer items-center justify-center transition-all hover:scale-125",
            children: /* @__PURE__ */ r(m, { size: 16 })
          }
        )
      ]
    }
  );
};
export {
  j as Banner
};
//# sourceMappingURL=Banner.js.map
