import { cva } from "class-variance-authority"

import Title from "./Title"

import styles from "./card.module.css"

import type { CardProps } from "@/types/components/myPages/myProfile/card/card"

const cardStyles = cva(styles.card)

export default function Card({ className, tag = "section", ...props }: CardProps) {
  const Cmp = tag
  return <Cmp className={cardStyles({ className })} {...props} />
}

Card.Title = Title
