import { Button } from "~/components/ui/button";

interface CommissionerDraftControlsProps {
  seasonStatus: string;
  isDraftComplete: boolean;
  isPaused: boolean;
  onStart: () => void;
  onPause: () => void;
  onResume: () => void;
  buttonClassName?: string;
}

export function CommissionerDraftControls({
  seasonStatus,
  isDraftComplete,
  isPaused,
  onStart,
  onPause,
  onResume,
  buttonClassName,
}: CommissionerDraftControlsProps) {
  if (seasonStatus === "pre_draft") {
    return (
      <Button className={buttonClassName} onClick={onStart}>
        Start Draft
      </Button>
    );
  }

  if (seasonStatus === "draft" && !isDraftComplete) {
    return isPaused ? (
      <Button className={buttonClassName} onClick={onResume}>
        Resume Draft
      </Button>
    ) : (
      <Button className={buttonClassName} variant="outline" onClick={onPause}>
        Pause Draft
      </Button>
    );
  }

  return null;
}
