"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.WsParamsFactory = void 0;
const ws_paramtype_enum_1 = require("../enums/ws-paramtype.enum");
class WsParamsFactory {
    exchangeKeyForValue(type, data, args) {
        var _a;
        if (!args) {
            return null;
        }
        switch (type) {
            case ws_paramtype_enum_1.WsParamtype.SOCKET:
                return args[0];
            case ws_paramtype_enum_1.WsParamtype.PAYLOAD:
                return data ? (_a = args[1]) === null || _a === void 0 ? void 0 : _a[data] : args[1];
            default:
                return null;
        }
    }
}
exports.WsParamsFactory = WsParamsFactory;
