"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPendingPlanningValidationError = getPendingPlanningValidationError;
function getPendingPlanningValidationError(input) {
    if (input.pendingPlanningIntent === undefined &&
        input.pendingPlanningReason !== undefined) {
        return "Workflow pendingPlanningReason requires pendingPlanningIntent.";
    }
    if (input.pendingPlanningIntent === undefined &&
        input.pendingPlanningSource !== undefined) {
        return "Workflow pendingPlanningSource requires pendingPlanningIntent.";
    }
    if (input.pendingPlanningIntent === "revise_plan" &&
        input.pendingWorkflowStartApprovalIntent === undefined) {
        return "Workflow revise_plan pending state requires a start-approval intent.";
    }
    if (input.pendingPlanningIntent === "replan" &&
        input.pendingWorkflowStartApprovalIntent !== undefined) {
        return "Workflow replan pending state cannot coexist with a start-approval intent.";
    }
    return null;
}
