import styles from "../private-zone-screen.module.css";

export interface StatusCardProps {
  message: string;
  actionLabel?: string;
  onAction?: () => void;
}

export function StatusCard({
  message,
  actionLabel,
  onAction,
}: StatusCardProps) {
  return (
    <div className={styles.statusCard}>
      <p>{message}</p>
      {actionLabel && onAction ? (
        <button type="button" onClick={onAction}>
          {actionLabel}
        </button>
      ) : null}
    </div>
  );
}
