import { Component, EventEmitter, Input, Output } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@ionic/angular";
import * as i2 from "@angular/common";
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";
function TapScannerWifiItemComponent_ion_item_1_ng_container_1_ng_container_4_span_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 8);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const device_r1 = i0.ɵɵnextContext(3).$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1("Host: ", device_r1.host, "\u00A0");
} }
function TapScannerWifiItemComponent_ion_item_1_ng_container_1_ng_container_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelement(1, "br");
    i0.ɵɵtemplate(2, TapScannerWifiItemComponent_ion_item_1_ng_container_1_ng_container_4_span_2_Template, 2, 1, "span", 7);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const device_r1 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", device_r1.host);
} }
function TapScannerWifiItemComponent_ion_item_1_ng_container_1_span_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 9);
    i0.ɵɵelement(1, "br");
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const device_r1 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1("Port: ", device_r1.port, "");
} }
function TapScannerWifiItemComponent_ion_item_1_ng_container_1_span_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelement(1, "br");
    i0.ɵɵtext(2, "WIFI Network");
    i0.ɵɵelementEnd();
} }
function TapScannerWifiItemComponent_ion_item_1_ng_container_1_tap_ble_rssi_signal_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "tap-ble-rssi-signal", 10);
    i0.ɵɵpipe(1, "rssiToSignalStrenght");
} if (rf & 2) {
    const device_r1 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵproperty("bars", i0.ɵɵpipeBind1(1, 1, device_r1.rssi || device_r1.level));
} }
function TapScannerWifiItemComponent_ion_item_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "ion-label");
    i0.ɵɵelementStart(2, "span", 4);
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(4, TapScannerWifiItemComponent_ion_item_1_ng_container_1_ng_container_4_Template, 3, 1, "ng-container", 3);
    i0.ɵɵtemplate(5, TapScannerWifiItemComponent_ion_item_1_ng_container_1_span_5_Template, 3, 1, "span", 5);
    i0.ɵɵtemplate(6, TapScannerWifiItemComponent_ion_item_1_ng_container_1_span_6_Template, 3, 0, "span", 3);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(7, TapScannerWifiItemComponent_ion_item_1_ng_container_1_tap_ble_rssi_signal_7_Template, 2, 3, "tap-ble-rssi-signal", 6);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const device_r1 = i0.ɵɵnextContext().$implicit;
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(device_r1.name || device_r1.SSID || "Hidden network");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", device_r1.host);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", device_r1.port);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", device_r1.SSID);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.showSignalStrenght);
} }
function TapScannerWifiItemComponent_ion_item_1_Template(rf, ctx) { if (rf & 1) {
    const _r14 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "ion-item", 2);
    i0.ɵɵlistener("click", function TapScannerWifiItemComponent_ion_item_1_Template_ion_item_click_0_listener() { i0.ɵɵrestoreView(_r14); const device_r1 = ctx.$implicit; const ctx_r13 = i0.ɵɵnextContext(); return ctx_r13._onItemClicked(device_r1); });
    i0.ɵɵtemplate(1, TapScannerWifiItemComponent_ion_item_1_ng_container_1_Template, 8, 5, "ng-container", 3);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const device_r1 = ctx.$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", device_r1);
} }
export class TapScannerWifiItemComponent {
    constructor() {
        this.onItemClicked = new EventEmitter();
        this.lines = 'full';
        this.showSignalStrenght = true;
        this.devices = [];
    }
    _onItemClicked(device) {
        this.onItemClicked.emit(device);
    }
}
/** @nocollapse */ TapScannerWifiItemComponent.ɵfac = function TapScannerWifiItemComponent_Factory(t) { return new (t || TapScannerWifiItemComponent)(); };
/** @nocollapse */ TapScannerWifiItemComponent.ɵcmp = i0.ɵɵdefineComponent({ type: TapScannerWifiItemComponent, selectors: [["tap-scanner-wifi-item"]], inputs: { lines: "lines", showSignalStrenght: "showSignalStrenght", devices: "devices" }, outputs: { onItemClicked: "onItemClicked" }, decls: 2, vars: 2, consts: [[3, "lines"], ["button", "", "class", "hover", 3, "click", 4, "ngFor", "ngForOf"], ["button", "", 1, "hover", 3, "click"], [4, "ngIf"], [1, "name"], ["class", "port", 4, "ngIf"], ["slot", "end", 3, "bars", 4, "ngIf"], ["class", "ip-address", 4, "ngIf"], [1, "ip-address"], [1, "port"], ["slot", "end", 3, "bars"]], template: function TapScannerWifiItemComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "ion-list", 0);
        i0.ɵɵtemplate(1, TapScannerWifiItemComponent_ion_item_1_Template, 2, 1, "ion-item", 1);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("lines", ctx.lines);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngForOf", ctx.devices);
    } }, directives: [i1.IonList, i2.NgForOf, i1.IonItem, i2.NgIf, i1.IonLabel, i3.BleRssiSignalComponent], pipes: [i4.RssiToSignalStrenghtPipe], styles: [".ip-address[_ngcontent-%COMP%], .port[_ngcontent-%COMP%]{font-size:.8em}.name[_ngcontent-%COMP%]{font-weight:700}"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TapScannerWifiItemComponent, [{
        type: Component,
        args: [{
                selector: 'tap-scanner-wifi-item',
                templateUrl: './tap-scanner-wifi-item.component.html',
                styleUrls: ['./tap-scanner-wifi-item.component.scss'],
            }]
    }], function () { return []; }, { onItemClicked: [{
            type: Output
        }], lines: [{
            type: Input
        }], showSignalStrenght: [{
            type: Input
        }], devices: [{
            type: Input
        }] }); })();
//# sourceMappingURL=data:application/json;base64, 