"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var format_helper_1 = require("../../format/format-helper");
/**
 *
 * <p>
 * Model representing a response application protocol data unit (response APDU)
 */
var APDUResponse = /** @class */ (function () {
    function APDUResponse() {
        this.data = new Uint8Array(0);
        this.status = Uint8Array.from([0, 0]);
    }
    APDUResponse.prototype.getData = function () {
        return this.data;
    };
    APDUResponse.prototype.getStatus = function () {
        return this.status;
    };
    APDUResponse.prototype.setStatus = function (status) {
        this.status = status;
        return this;
    };
    APDUResponse.prototype.setData = function (data) {
        this.data = data;
        return this;
    };
    APDUResponse.prototype.statusEquals = function (status) {
        return status.length === 2 && this.status.length === 2 && status[0] == this.status[0] && status[1] == this.status[1];
    };
    APDUResponse.prototype.toString = function () {
        return "APDUResponse[data=" + format_helper_1.FormatHelper.toHexString(this.data) + "; status=" + format_helper_1.FormatHelper.toHexString(this.status) + "]";
    };
    return APDUResponse;
}());
exports.APDUResponse = APDUResponse;
