"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.WorkflowDecisionValidationError = exports.WORKFLOW_DECISION_VALIDATION_ERROR_CODES = void 0;
exports.isWorkflowDecisionValidationError = isWorkflowDecisionValidationError;
exports.WORKFLOW_DECISION_VALIDATION_ERROR_CODES = {
    planRequiredBeforeQueue: "plan_required_before_queue",
};
class WorkflowDecisionValidationError extends Error {
    code;
    path;
    repairEligible;
    constructor(message, input) {
        super(message, input.cause !== undefined ? { cause: input.cause } : undefined);
        this.name = "WorkflowDecisionValidationError";
        this.code = input.code;
        this.path = [...input.path];
        this.repairEligible = input.repairEligible ?? false;
    }
}
exports.WorkflowDecisionValidationError = WorkflowDecisionValidationError;
function isWorkflowDecisionValidationError(error) {
    return error instanceof WorkflowDecisionValidationError;
}
