import React from "react";
import cn from "classnames";
import PropTypes from "prop-types";
import ICardContent from "./card-content.d";

const CardFooter: React.FC<ICardContent> = ({ className, children, ...props }) => {
  const dataTestId = props["data-testid"] || "honey-ui-card-footer";
  return (
    <div {...props} data-testid={dataTestId} className={cn("card-footer", className)}>
      {children}
    </div>
  );
};

CardFooter.displayName = "Card Footer";
CardFooter.propTypes = {
  className: PropTypes.string,
  children: PropTypes.oneOfType([
    PropTypes.arrayOf(PropTypes.node),
    PropTypes.node,
    PropTypes.string
  ])
};

export default CardFooter;
