import { j as i } from "../../_virtual/jsx-runtime.js";
import { css as t } from "styled-components";
import { getColorAlias as r } from "../../utils/index.js";
import n from "../../icons/AlertCircle.js";
import a from "../../icons/AlertTriangle.js";
import l from "../../icons/CheckCircle.js";
import s from "../../icons/InfoCircle.js";
function b(o, e) {
  switch (o) {
    case "neutral":
      return t`
        background-color: ${r("containerSubtle")};
      `;
    case "neutral-alternative":
      return t`
        background-color: ${r("containerDefault")};
      `;
    case "info":
      return t`
        background-color: ${r("supportInfo02")};

        ${e} > svg {
          fill: ${r("supportInfo")};
        }
      `;
    case "positive":
      return t`
        background-color: ${r("supportPositive02")};

        ${e} > svg {
          fill: ${r("supportPositive")};
        }
      `;
    case "warning":
      return t`
        background-color: ${r("supportWarning02")};

        ${e} > svg {
          fill: ${r("supportWarning")};
        }
      `;
    case "error":
      return t`
        background-color: ${r("supportError02")};

        ${e} > svg {
          fill: ${r("supportError")};
        }
      `;
  }
}
function v(o, e) {
  if (o || o === null) return o;
  switch (e) {
    case "neutral":
    case "neutral-alternative":
      return o;
    case "info":
      return /* @__PURE__ */ i.jsx(s, { role: "img", "aria-label": "info-icon" });
    case "positive":
      return /* @__PURE__ */ i.jsx(l, { role: "img", "aria-label": "positive-icon" });
    case "warning":
      return /* @__PURE__ */ i.jsx(a, { role: "img", "aria-label": "warning-icon" });
    case "error":
      return /* @__PURE__ */ i.jsx(n, { role: "img", "aria-label": "error-icon" });
  }
}
export {
  v as getIcon,
  b as mapTypeToCss
};
