import { Component, Input, Output, EventEmitter } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@ionic/angular";
import * as i3 from "../../tap-scanner-common/ble-rssi-signal/ble-rssi-signal.component";
import * as i4 from "../../tap-scanner-common/rssi-to-signal-strenght.pipe";
export class TapScanResultsComponent {
    constructor() {
        this.onItemClicked = new EventEmitter();
        this.lines = 'full';
        this.showMacAddress = false;
        this.showSignalStrenght = true;
        this.devices = [];
    }
    _onItemClicked(device) {
        this.onItemClicked.emit(device);
    }
}
/** @nocollapse */ TapScanResultsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TapScanResultsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
/** @nocollapse */ TapScanResultsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TapScanResultsComponent, selector: "tap-ble-scan-result", inputs: { lines: "lines", showMacAddress: "showMacAddress", showSignalStrenght: "showSignalStrenght", devices: "devices" }, outputs: { onItemClicked: "onItemClicked" }, ngImport: i0, template: "<ion-list [lines]=\"lines\" *ngIf=\"devices.length > 0\">\n  <ion-item\n    (click)=\"_onItemClicked(device)\"\n    class=\"hover scan-result-item\"\n    *ngFor=\"let device of devices\"\n  >\n    <ion-label>\n      <span class=\"device-name\">{{ device.name }}</span>\n      <br *ngIf=\"showMacAddress\" /><span\n        *ngIf=\"showMacAddress\"\n        class=\"mac-address\"\n        >{{ device.address }}</span\n      >\n    </ion-label>\n    <tap-ble-rssi-signal\n      *ngIf=\"showSignalStrenght\"\n      slot=\"end\"\n      [bars]=\"device.rssi | rssiToSignalStrenght\"\n    ></tap-ble-rssi-signal>\n  </ion-item>\n</ion-list>\n", styles: [".scan-result-item{cursor:pointer}.mac-address{font-size:.7em}.device-name{font-weight:700}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "counterFormatter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { kind: "component", type: i2.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: i2.IonList, selector: "ion-list", inputs: ["inset", "lines", "mode"] }, { kind: "component", type: i3.BleRssiSignalComponent, selector: "tap-ble-rssi-signal", inputs: ["bars", "colors"] }, { kind: "pipe", type: i4.RssiToSignalStrenghtPipe, name: "rssiToSignalStrenght" }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TapScanResultsComponent, decorators: [{
            type: Component,
            args: [{ selector: 'tap-ble-scan-result', template: "<ion-list [lines]=\"lines\" *ngIf=\"devices.length > 0\">\n  <ion-item\n    (click)=\"_onItemClicked(device)\"\n    class=\"hover scan-result-item\"\n    *ngFor=\"let device of devices\"\n  >\n    <ion-label>\n      <span class=\"device-name\">{{ device.name }}</span>\n      <br *ngIf=\"showMacAddress\" /><span\n        *ngIf=\"showMacAddress\"\n        class=\"mac-address\"\n        >{{ device.address }}</span\n      >\n    </ion-label>\n    <tap-ble-rssi-signal\n      *ngIf=\"showSignalStrenght\"\n      slot=\"end\"\n      [bars]=\"device.rssi | rssiToSignalStrenght\"\n    ></tap-ble-rssi-signal>\n  </ion-item>\n</ion-list>\n", styles: [".scan-result-item{cursor:pointer}.mac-address{font-size:.7em}.device-name{font-weight:700}\n"] }]
        }], ctorParameters: function () { return []; }, propDecorators: { onItemClicked: [{
                type: Output
            }], lines: [{
                type: Input
            }], showMacAddress: [{
                type: Input
            }], showSignalStrenght: [{
                type: Input
            }], devices: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozL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