"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isWorkflowAwaitingStartApproval = isWorkflowAwaitingStartApproval;
exports.hasPendingWorkflowStartApproval = hasPendingWorkflowStartApproval;
exports.isWorkflowWaitingForForeignApproval = isWorkflowWaitingForForeignApproval;
const publisher_events_1 = require("../publisher-events");
function isWorkflowAwaitingStartApproval(workflowState) {
    return (hasPendingWorkflowStartApproval(workflowState) &&
        workflowState?.needsHumanReason ===
            publisher_events_1.WORKFLOW_NEEDS_HUMAN_REASONS.startApproval);
}
function hasPendingWorkflowStartApproval(workflowState) {
    return workflowState?.pendingWorkflowStartApprovalIntent !== undefined;
}
function isWorkflowWaitingForForeignApproval(workflowState) {
    return (workflowState?.needsHumanReason ===
        publisher_events_1.WORKFLOW_NEEDS_HUMAN_REASONS.foreignApproval);
}
