import * as React from 'react';
import {
  BaseCard,
  BaseCardContent,
  BaseCardDescription,
  BaseCardFooter,
  BaseCardHeader,
  type BaseCardProps,
  BaseCardTitle,
  baseCardVariants,
} from './BaseCard';

import { cva } from 'class-variance-authority';
import { cn } from '../..';
import styles from './Card.module.css';

export type CardProps = BaseCardProps & {};

const cardVariants = cva();

function Card(props: CardProps) {
  return (
    <BaseCard
      className={cn(styles.Card, baseCardVariants, cardVariants)}
      {...props}
    />
  );
}

const CardContent = BaseCardContent;
const CardDescription = BaseCardDescription;
const CardFooter = BaseCardFooter;
const CardHeader = BaseCardHeader;
const CardTitle = BaseCardTitle;

export {
  Card,
  CardContent,
  CardDescription,
  CardFooter,
  CardHeader,
  CardTitle,
};
