/**
 * @fileoverview added by tsickle
 * Generated from: lib/tap-connect/tap-connect-nfc/tap-connect-nfc.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import { __awaiter, __generator } from "tslib";
import { Component, Output, EventEmitter } from '@angular/core';
import { NfcService } from '../../tap-scanner/tap-scanner-nfc/nfc-service.service';
var TapConnectNfcComponent = /** @class */ (function () {
    function TapConnectNfcComponent(nfcService) {
        this.nfcService = nfcService;
        this.isLoadingDevice = false;
        this.isCordova = false;
        this.onProtocolSelected = new EventEmitter();
        this.onError = new EventEmitter();
    }
    /**
     * @return {?}
     */
    TapConnectNfcComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                return [2 /*return*/];
            });
        });
    };
    /**
     * @return {?}
     */
    TapConnectNfcComponent.prototype.ngOnDestroy = /**
     * @return {?}
     */
    function () {
    };
    /**
     * @param {?} error
     * @return {?}
     */
    TapConnectNfcComponent.prototype._onError = /**
     * @param {?} error
     * @return {?}
     */
    function (error) {
        console.warn(error);
        this.error = error;
        this.onError.emit(error);
    };
    /**
     * @param {?} event
     * @return {?}
     */
    TapConnectNfcComponent.prototype._onProtocolSelected = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                this.error = undefined;
                this.onProtocolSelected.emit(event);
                return [2 /*return*/];
            });
        });
    };
    TapConnectNfcComponent.decorators = [
        { type: Component, args: [{
                    selector: 'tap-connect-nfc',
                    template: "<tap-scanner-nfc (onProtocolSelected)=\"_onProtocolSelected($event)\"></tap-scanner-nfc>\r\n",
                    styles: [""]
                }] }
    ];
    /** @nocollapse */
    TapConnectNfcComponent.ctorParameters = function () { return [
        { type: NfcService }
    ]; };
    TapConnectNfcComponent.propDecorators = {
        onProtocolSelected: [{ type: Output }],
        onError: [{ type: Output }]
    };
    return TapConnectNfcComponent;
}());
export { TapConnectNfcComponent };
if (false) {
    /** @type {?} */
    TapConnectNfcComponent.prototype.error;
    /** @type {?} */
    TapConnectNfcComponent.prototype.isLoadingDevice;
    /** @type {?} */
    TapConnectNfcComponent.prototype.isCordova;
    /** @type {?} */
    TapConnectNfcComponent.prototype.onProtocolSelected;
    /** @type {?} */
    TapConnectNfcComponent.prototype.onError;
    /** @type {?} */
    TapConnectNfcComponent.prototype.nfcService;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFwLWNvbm5lY3QtbmZjLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0Bpb3RpemUvaW9uaWMvIiwic291cmNlcyI6WyJsaWIvdGFwLWNvbm5lY3QvdGFwLWNvbm5lY3QtbmZjL3RhcC1jb25uZWN0LW5mYy5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEsT0FBTyxFQUFFLFNBQVMsRUFBVSxNQUFNLEVBQUUsWUFBWSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3hFLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSx1REFBdUQsQ0FBQztBQUduRjtJQWNFLGdDQUFtQixVQUFzQjtRQUF0QixlQUFVLEdBQVYsVUFBVSxDQUFZO1FBTnpDLG9CQUFlLEdBQVksS0FBSyxDQUFDO1FBQ2pDLGNBQVMsR0FBWSxLQUFLLENBQUM7UUFFakIsdUJBQWtCLEdBQXdDLElBQUksWUFBWSxFQUFFLENBQUM7UUFDN0UsWUFBTyxHQUF3QixJQUFJLFlBQVksRUFBRSxDQUFDO0lBRWYsQ0FBQzs7OztJQUV4Qyx5Q0FBUTs7O0lBQWQ7Ozs7OztLQUNDOzs7O0lBRUQsNENBQVc7OztJQUFYO0lBQ0EsQ0FBQzs7Ozs7SUFFRCx5Q0FBUTs7OztJQUFSLFVBQVMsS0FBWTtRQUNuQix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