"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = require("../../../core");
/**
 * Created by Stephane on 02/02/2018.
 */
var DefaultResponseEncoder = /** @class */ (function () {
    function DefaultResponseEncoder() {
        this.encoder = new core_1.APDU.Response.APDUResponseConverter();
    }
    DefaultResponseEncoder.prototype.encode = function (response) {
        var apduResponse = new core_1.APDU.Response.APDUResponse();
        apduResponse.setData(response.toBytes());
        apduResponse.setStatus(core_1.APDU.APDUStatusCode.SUCCESSFUL);
        return this.encoder.encode(apduResponse);
    };
    return DefaultResponseEncoder;
}());
exports.DefaultResponseEncoder = DefaultResponseEncoder;
