"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.dispatchMatchedOutbounds = dispatchMatchedOutbounds;
const omnlForwardAdapter_1 = require("./omnlForwardAdapter");
const intakeGatewayAdapter_1 = require("./intakeGatewayAdapter");
async function dispatchMatchedOutbounds(projectRoot, config, registry, event) {
    if (!event.matched || !event.canonical)
        return undefined;
    const outbound = {};
    const omnlEnabled = config.outbound?.omnlForward?.enabled || config.omnlForward?.enabled;
    if (omnlEnabled) {
        outbound.omnl = await (0, omnlForwardAdapter_1.forwardToOmnl)(projectRoot, config, event);
    }
    if (config.outbound?.intakeGateway?.enabled) {
        outbound.intakeGateway = await (0, intakeGatewayAdapter_1.submitToIntakeGateway)(config, registry, event.canonical);
    }
    return outbound;
}
//# sourceMappingURL=dispatchOutcomes.js.map