"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var response_1 = require("../../client/impl/response");
var ResponseConverterWrapper = /** @class */ (function () {
    function ResponseConverterWrapper(_converter) {
        this._converter = _converter;
    }
    ResponseConverterWrapper.prototype.decode = function (data) {
        return this._converter.decode(response_1.Response.SUCCESS(data));
    };
    ResponseConverterWrapper.prototype.encode = function (data) {
        return this._converter.encode(data).rawBody();
    };
    return ResponseConverterWrapper;
}());
exports.ResponseConverterWrapper = ResponseConverterWrapper;
var ResponseConverterUnwrapper = /** @class */ (function () {
    function ResponseConverterUnwrapper(_converter) {
        this._converter = _converter;
    }
    ResponseConverterUnwrapper.prototype.decode = function (data) {
        return this._converter.decode(data);
    };
    ResponseConverterUnwrapper.prototype.encode = function (data) {
        // return this._converter.encode(data);
        throw new Error("Not implemented");
    };
    return ResponseConverterUnwrapper;
}());
exports.ResponseConverterUnwrapper = ResponseConverterUnwrapper;
var ResponseConverterHelper = /** @class */ (function () {
    function ResponseConverterHelper() {
    }
    ResponseConverterHelper.wrap = function (converter) {
        return new ResponseConverterWrapper(converter);
    };
    ResponseConverterHelper.unwrap = function (converter) {
        return new ResponseConverterUnwrapper(converter);
    };
    return ResponseConverterHelper;
}());
exports.ResponseConverterHelper = ResponseConverterHelper;
