import { adminComponentStyles } from "./design-system";

interface AdminCardProps {
  children: React.ReactNode;
  header?: React.ReactNode;
  footer?: React.ReactNode;
  className?: string;
  headerClassName?: string;
  bodyClassName?: string;
  footerClassName?: string;
  padding?: "default" | "none";
}

export default function AdminCard({
  children,
  header,
  footer,
  className = "",
  headerClassName = "",
  bodyClassName = "",
  footerClassName = "",
  padding = "default",
}: AdminCardProps) {
  const bodyPadding = padding === "none" ? "" : adminComponentStyles.card.body;

  return (
    <div className={`${adminComponentStyles.card.base} ${className}`}>
      {header && (
        <div className={`${adminComponentStyles.card.header} ${headerClassName}`}>
          {header}
        </div>
      )}
      <div className={`${bodyPadding} ${bodyClassName}`}>{children}</div>
      {footer && (
        <div className={`${adminComponentStyles.card.footer} ${footerClassName}`}>
          {footer}
        </div>
      )}
    </div>
  );
}
