import { Component, Input, Output, EventEmitter } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@ionic/angular";
import * as i2 from "../../tap-scanner-common/ble-rssi-signal/ble-rssi-signal.component";
import * as i3 from "@angular/common";
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);
    }
    /**
     * @ignore
     */
    trackByFn(index, item) {
        return `${item.address}-${item.rssi}`;
    }
}
/** @nocollapse */ /** @nocollapse */ TapScanResultsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TapScanResultsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
/** @nocollapse */ /** @nocollapse */ TapScanResultsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", 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\">\n  <ion-item\n    button\n    (click)=\"_onItemClicked(device)\"\n    class=\"hover\"\n    *ngFor=\"let device of devices; trackBy: trackByFn\"\n  >\n    <ion-label>\n      {{ device.name }}\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: [""], components: [{ type: i1.IonList, selector: "ion-list", inputs: ["inset", "lines", "mode"] }, { type: i1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { type: i1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { type: i2.BleRssiSignalComponent, selector: "tap-ble-rssi-signal", inputs: ["bars", "colors"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "rssiToSignalStrenght": i4.RssiToSignalStrenghtPipe } });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TapScanResultsComponent, decorators: [{
            type: Component,
            args: [{ selector: 'tap-ble-scan-result', template: "<ion-list [lines]=\"lines\">\n  <ion-item\n    button\n    (click)=\"_onItemClicked(device)\"\n    class=\"hover\"\n    *ngFor=\"let device of devices; trackBy: trackByFn\"\n  >\n    <ion-label>\n      {{ device.name }}\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: [""] }]
        }], ctorParameters: function () { return []; }, propDecorators: { onItemClicked: [{
                type: Output
            }], lines: [{
                type: Input
            }], showMacAddress: [{
                type: Input
            }], showSignalStrenght: [{
                type: Input
            }], devices: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFwLXNjYW4tcmVzdWx0cy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9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