import { Slot } from "@radix-ui/react-slot"

import { biroScriptVariants } from "./variants"

import type { BiroScriptProps } from "./biroScript"

export default function BiroScript({
  asChild = false,
  className,
  color,
  textAlign,
  type,
  tilted,
  ...props
}: BiroScriptProps) {
  const Comp = asChild ? Slot : "span"
  const classNames = biroScriptVariants({
    className,
    color,
    textAlign,
    type,
    tilted,
  })
  return <Comp className={classNames} {...props} />
}
