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

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

const config = {
  variants: {
    type: {
      regular: styles.regular,
      bold: styles.bold,
      label: styles.labels,
    },
    color: {
      black: styles.black,
      burgundy: styles.burgundy,
      pale: styles.pale,
      peach50: styles.peach50,
      uiTextMediumContrast: styles.uiTextMediumContrast,
      uiTextHighContrast: styles.uiTextHighContrast,
      uiTextPlaceholder: styles.uiTextPlaceholder,
      white: styles.white,
      baseTextDisabled: styles.baseTextDisabled,
    },
    textAlign: {
      center: styles.center,
      left: styles.left,
    },
    textTransform: {
      uppercase: styles.uppercase,
    },
  },
  defaultVariants: {
    type: "regular",
  },
} as const

export const footnoteVariants = cva(styles.footnote, config)

const fontOnlyConfig = {
  variants: {
    type: {
      regular: styles.regular,
      bold: styles.bold,
      label: styles.labels,
    },
    textAlign: {
      center: styles.center,
      left: styles.left,
    },
    textTransform: {
      uppercase: styles.uppercase,
    },
  },
  defaultVariants: {
    type: "regular",
  },
} as const

export const footnoteFontOnlyVariants = cva(
  styles.footnoteFontOnly,
  fontOnlyConfig
)
