import type { ApiMinistryProgressReportAssignment } from "./service/progress-report-service";

type MinistryProgressReportStatus =
  ApiMinistryProgressReportAssignment["status"];

export function getProgressReportWorkflowActions(
  status: MinistryProgressReportStatus,
  hasAttachment: boolean,
) {
  return {
    canShare: status === "DRAFT" && hasAttachment,
    canSaveDraft: status === "DRAFT" || status === "PSWG_REVIEWED",
    canSubmit: status === "PSWG_REVIEWED" && hasAttachment,
  };
}
