import { mapAndReduceOver as c } from "../../utils/map-helper.js";
const s = (a) => {
  const { get: i, color: o, spacing: t } = a, e = {
    info: {
      backgroundColor: o("interaction.sub-medium"),
      borderColor: o("interaction.sub-strong")
    },
    success: {
      backgroundColor: o("interaction.success-subtle"),
      borderColor: o("interaction.success")
    },
    warn: {
      backgroundColor: o("interaction.warning-subtle"),
      borderColor: o("interaction.warning")
    },
    critical: {
      backgroundColor: o("interaction.critical-subtle"),
      borderColor: o("interaction.critical")
    }
  };
  return {
    ".toast-container": {
      position: "absolute",
      zIndex: i("zIndex.toast"),
      top: 0,
      left: 0,
      right: 0,
      pointerEvents: "none",
      padding: t(6, 8),
      gap: t(4),
      display: "flex",
      flexDirection: "column"
    },
    ".toast": {
      margin: "auto",
      padding: t(5, 4),
      maxWidth: t(192),
      pointerEvents: "auto",
      borderStyle: "solid",
      borderWidth: "1px",
      borderRadius: t(1.5),
      boxShadow: i("boxShadow.default")
    },
    ...c(
      (r, n) => ({
        [`.toast-${r}`]: n,
        [`.toast-${r} .toast-icon`]: {
          fill: n.borderColor
        },
        // Used for css imported boxicons that are font-like
        [`.toast-${r} .toast-icon-font`]: {
          color: n.borderColor
        }
      }),
      e
    )
  };
}, l = {
  getComponents: s
};
export {
  l as TailwindToast
};
