/**
 * @fileoverview added by tsickle
 * Generated from: lib/tap-connect/ble/tap-connect-ble.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import { __awaiter, __generator } from "tslib";
import { Component, EventEmitter, Output, Input, TemplateRef } from '@angular/core';
import { Platform } from '@ionic/angular';
import { debug } from '../../logger';
/** @type {?} */
var TAG = 'TapConnectBle';
var TapConnectBleComponent = /** @class */ (function () {
    function TapConnectBleComponent(platform) {
        this.platform = platform;
        this.isCordova = false;
        this.onProtocolSelected = new EventEmitter();
        /**
         * Display start/stop scan buttons
         * @deprecated
         */
        this.showScanButton = true;
    }
    /**
     * @return {?}
     */
    TapConnectBleComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                this.isCordova = this.platform.is('cordova');
                debug(TAG, 'isCordova', this.isCordova);
                return [2 /*return*/];
            });
        });
    };
    /**
     * @return {?}
     */
    TapConnectBleComponent.prototype.ngOnDestroy = /**
     * @return {?}
     */
    function () {
    };
    /**
     * @param {?} error
     * @return {?}
     */
    TapConnectBleComponent.prototype.onError = /**
     * @param {?} error
     * @return {?}
     */
    function (error) {
        console.warn(error);
        this.error = error;
    };
    /**
     * @param {?} event
     * @return {?}
     */
    TapConnectBleComponent.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*/];
            });
        });
    };
    TapConnectBleComponent.decorators = [
        { type: Component, args: [{
                    selector: 'tap-connect-ble',
                    template: "<tap-scanner-ble *ngIf=\"isCordova\" [scanResultsTemplate]=\"scanResultsTemplate\" [showScanButton]=\"showScanButton\" (onProtocolSelected)=\"_onProtocolSelected($event)\">\r\n</tap-scanner-ble>\r\n<tap-scanner-web-bluetooth *ngIf=\"!isCordova\" [showScanButton]=\"showScanButton\" (onProtocolSelected)=\"_onProtocolSelected($event)\"></tap-scanner-web-bluetooth>",
                    styles: [""]
                }] }
    ];
    /** @nocollapse */
    TapConnectBleComponent.ctorParameters = function () { return [
        { type: Platform }
    ]; };
    TapConnectBleComponent.propDecorators = {
        onProtocolSelected: [{ type: Output }],
        showScanButton: [{ type: Input }],
        scanResultsTemplate: [{ type: Input }]
    };
    return TapConnectBleComponent;
}());
export { TapConnectBleComponent };
if (false) {
    /** @type {?} */
    TapConnectBleComponent.prototype.error;
    /** @type {?} */
    TapConnectBleComponent.prototype.isCordova;
    /** @type {?} */
    TapConnectBleComponent.prototype.onProtocolSelected;
    /**
     * Display start/stop scan buttons
     * @deprecated
     * @type {?}
     */
    TapConnectBleComponent.prototype.showScanButton;
    /**
     * Scan result template to use to display scan results.
     *
     * If not provided, it will use a default component to display devices.
     *
     * ```html
     * <!-- Display devices with tap-ble-scan-result component -->
     * <tap-scanner-ble [scanResultsTemplate]="scanResultsTemplate">
     *    <ng-template #scanResultsTemplate let-devices>
     *        <tap-ble-scan-result [devices]="devices" [showSignalStrenght]="false"></tap-ble-scan-result>
     *    </ng-template>
     * </tap-scanner-ble>
     * ```
     * @type {?}
     */
    TapConnectBleComponent.prototype.scanResultsTemplate;
    /** @type {?} */
    TapConnectBleComponent.prototype.platform;
}
//# sourceMappingURL=data:application/json;base64, 