import { Button as ButtonRAC } from 'react-aria-components'

import { variants } from './variants'

import type { IconButtonProps } from './types'

export function IconButton({
  theme,
  style,
  className,
  wrapping,
  ...props
}: IconButtonProps) {
  const classNames = variants({
    theme,
    style,
    wrapping,
    className,
  })

  return <ButtonRAC {...props} className={classNames} />
}
