import { cx } from 'class-variance-authority'
import { Typography } from '../Typography'

import styles from './chip-link.module.css'

import type { PropsWithChildren } from 'react'
import {
  Link as LinkRAC,
  LinkProps as LinkRACProps,
} from 'react-aria-components'

export function ChipLink({
  children,
  className,
  ...props
}: PropsWithChildren<LinkRACProps>) {
  return (
    <Typography variant="Body/Supporting text (caption)/smBold">
      <LinkRAC {...props} className={cx(styles.chip, className)}>
        {children}
      </LinkRAC>
    </Typography>
  )
}
