'use client'

import { variants } from './variants'

import type { VariantProps } from 'class-variance-authority'
import type { ComponentProps, PropsWithChildren } from 'react'
import type { Button } from 'react-aria-components'

interface FakeButtonProps
  extends PropsWithChildren,
    Omit<ComponentProps<typeof Button>, 'children' | 'onPress'>,
    VariantProps<typeof variants> {}

export function FakeButton({
  variant,
  color,
  size,
  typography,
  children,
  className,
  ...props
}: FakeButtonProps) {
  const classNames = variants({
    color,
    size,
    variant,
    typography,
    className,
  })

  return (
    <span
      className={classNames}
      {...(props as React.HTMLProps<HTMLSpanElement>)}
    >
      {children}
    </span>
  )
}
