const editableSubmissionStatuses =
  new Set([
    "draft",
    "returned"
  ]);

const isSubmissionEditable = (
  submissionStatus
) => {
  return editableSubmissionStatuses.has(
    String(
      submissionStatus || ""
    ).trim()
  );
};

const isSubmissionReturned = (
  submissionStatus
) => {
  return (
    String(
      submissionStatus || ""
    ).trim() ===
    "returned"
  );
};

module.exports = {
  isSubmissionEditable,
  isSubmissionReturned
};