import { cva } from "class-variance-authority"

import styles from "./alert.module.css"

import { AlertTypeEnum } from "@/types/enums/alert"

export const alertVariants = cva(styles.alert, {
  variants: {
    variant: {
      inline: styles.inline,
      banner: styles.banner,
    },
    type: {
      [AlertTypeEnum.Info]: styles.info,
      [AlertTypeEnum.Warning]: styles.warning,
      [AlertTypeEnum.Alarm]: styles.alarm,
      [AlertTypeEnum.Success]: styles.success,
    },
  },
  defaultVariants: {
    variant: "inline",
    type: AlertTypeEnum.Info,
  },
})
