"use client"

import type { ICardProps } from "./Card.d"
import type { JSX } from "react"

import { Card as RadixCard } from "@radix-ui/themes"
import { forwardRef } from "react"
import cs from "classnames"

import styles from "./Card.module.scss"

export const Card = forwardRef<HTMLDivElement, ICardProps>(
	({ children, className, ...props }, ref): JSX.Element => (
		<RadixCard ref={ref} className={cs(styles.card, className)} {...props}>
			{children}
		</RadixCard>
	),
)

Card.displayName = "Card"
