"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.buildWorkflowPublishPrecondition = buildWorkflowPublishPrecondition;
function buildWorkflowPublishPrecondition(input) {
    return {
        expectedCanonicalCommentId: input.currentWorkflowStateCommentId,
        expectedLastScannedCommentCursor: input.currentWorkflowStateCommentId === null
            ? null
            : (input.workflowState?.lastScannedCommentCursor ?? null),
        expectedPlanRevision: input.currentWorkflowStateCommentId === null
            ? null
            : (input.workflowState?.planRevision ?? null),
    };
}
