import cx from "classnames";
import React from "react";

import { Card, CardColor } from "../Card";

import { CLASS_ROOT } from "./constants";

export interface PromotionCardProps {
  className?: string;
  children?: React.ReactNode;
  color?: CardColor;
  [key: string]: any;
}

export const PromotionCard: React.FC<PromotionCardProps> = ({
  className,
  children,
  color = "background-primary",
  ...other
}) => {
  const classes = cx(CLASS_ROOT, className);

  return (
    <Card className={classes} color={color} {...other}>
      {children}
    </Card>
  );
};

PromotionCard.displayName = "PromotionCard";
