import { mapAndReduceOver as e } from "../../utils/map-helper.js";
const i = (c) => {
  const { spacing: r, color: n } = c, t = {
    primary: {
      backgroundColor: n("primary.40"),
      color: n("content.primary")
    },
    info: {
      backgroundColor: n("blue.40"),
      color: n("content.primary")
    },
    warn: {
      backgroundColor: n("amber.40"),
      color: n("content.primary")
    },
    critical: {
      backgroundColor: n("alertRed.40"),
      color: n("content.primary")
    },
    dark: {
      backgroundColor: n("grey.40"),
      color: n("content.primary")
    },
    success: {
      backgroundColor: n("green.70"),
      color: n("content.inverse.strong")
    }
  };
  return {
    ".banner": {
      width: "100%",
      padding: r(2, 4)
    },
    ...e(
      (o, a) => ({
        [`.banner-${o}`]: a
      }),
      t
    ),
    ".banner-floating": {
      width: "100%",
      display: "flex",
      justifyContent: "center"
    },
    ".banner-floating .banner-tab": {
      borderRadius: r(0, 0, 2, 2),
      width: "fit-content",
      padding: r(0, 2, 1, 2)
    },
    ...e(
      (o, a) => ({
        [`.banner-floating-${o}`]: {
          borderTop: `${r(2)} solid ${a.backgroundColor}`
        },
        [`.banner-floating-${o} .banner-tab`]: a
      }),
      t
    )
  };
}, l = {
  getComponents: i
};
export {
  l as TailwindBanner
};
