/**
 * @fileoverview added by tsickle
 * Generated from: lib/tap-connect/tap-connection-store/tap-connection-store-item/tap-connection-store-item.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { TapConnectionStoreService } from '../tap-connection-store.service';
export class TapConnectionStoreItemComponent {
    /**
     * @param {?} tapConnectionStoreService
     */
    constructor(tapConnectionStoreService) {
        this.tapConnectionStoreService = tapConnectionStoreService;
        this.selected = new EventEmitter();
    }
    /**
     * @return {?}
     */
    ngOnInit() {
    }
    /**
     * @return {?}
     */
    connect() {
        if (this.item) {
            this.selected.emit(this.item);
        }
    }
    /**
     * @return {?}
     */
    remove() {
        if (this.item) {
            this.tapConnectionStoreService.remove(this.item);
        }
    }
}
TapConnectionStoreItemComponent.decorators = [
    { type: Component, args: [{
                selector: 'tap-connection-store-item',
                template: "<ion-card *ngIf=\"item\" (click)=\"connect()\">\r\n\t<ion-list>\r\n\t\t<ion-item>\r\n      <ion-badge>\r\n\t\t\t\t{{ item.connection.type }}\r\n\t\t\t</ion-badge>\r\n      &nbsp;\r\n\t\t\t<span class=\"title\">{{ item.config.appName }}</span>\r\n\t\t\t&nbsp;\r\n\t\t\t<ion-button slot=\"end\" color=\"danger\" fill=\"clear\" (click)=\"remove()\">\r\n\t\t\t\t<ion-icon name=\"close\"></ion-icon>\r\n\t\t\t\t<!-- &nbsp; Remove -->\r\n\t\t\t</ion-button>\r\n\t\t</ion-item>\r\n\t\t<!-- <ion-item\r\n\t\t\tclass=\"extra-info\">\r\n\t\t\t<ion-icon name=\"time\"></ion-icon>\r\n\t\t\t&nbsp;\r\n\t\t\t{{ item.meta.lastConnection | date }}\r\n\t\t</ion-item> -->\r\n\t\t<!-- <ion-item class=\"extra-info\">\r\n\t\t\t<ion-icon name=\"information-circle\"></ion-icon>\r\n      &nbsp;\r\n      v{{ item.config.version }}\r\n\t\t</ion-item> -->\r\n\t\t<ion-item class=\"extra-info\">\r\n\t\t\t<ion-icon name=\"hardware-chip\"></ion-icon>\r\n\t\t\t&nbsp;\r\n\t\t\t<!-- <ion-label>Serial number</ion-label> -->\r\n\t\t\t{{ item.config.serialNumber }}\r\n\t\t</ion-item>\r\n\t\t<ion-item\r\n\t\t\t*ngIf=\"item.connection.type === 'mqtt'\" class=\"extra-info\">\r\n\t\t\t<!-- <ion-label>Last connection</ion-label> -->\r\n\t\t\t<ion-icon name=\"link\"></ion-icon>\r\n\t\t\t&nbsp;\r\n\t\t\t<span class=\"\">{{ item.connection.info.endpoint }}</span>\r\n\t\t</ion-item>\r\n\t\t<ion-item\r\n\t\t\t*ngIf=\"item.connection.type === 'ble'\" class=\"extra-info\">\r\n\t\t\t<!-- <ion-label>Last connection</ion-label> -->\r\n\t\t\t<ion-icon name=\"link\"></ion-icon>\r\n\t\t\t&nbsp;\r\n\t\t\t<span class=\"\">{{ item.connection.info.mac }}</span>\r\n\t\t</ion-item>\r\n\t\t<ion-item\r\n\t\t\t*ngIf=\"item.connection.type === 'socket' || item.connection.type === 'websocket'\" class=\"extra-info\">\r\n\t\t\t<!-- <ion-label>Last connection</ion-label> -->\r\n\t\t\t<ion-icon name=\"link\"></ion-icon>\r\n\t\t\t&nbsp;\r\n\t\t\t<span class=\"\">{{ item.connection.info.url }}</span>\r\n\t\t</ion-item>\r\n\t\t<ion-item\r\n\t\t\t*ngIf=\"item.connection.type === 'wifi'\" class=\"extra-info\">\r\n\t\t\t<!-- <ion-label>Last connection</ion-label> -->\r\n\t\t\t<ion-icon name=\"link\"></ion-icon>\r\n\t\t\t&nbsp;\r\n\t\t\t<span class=\"\">{{ item.connection.info.ssid }}</span>\r\n\t\t</ion-item>\r\n\t\t<!-- <ion-item>\r\n\t\t\t\t\t<ion-buttons slot=\"end\">\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t<ion-button slot=\"end\" color=\"primary\" fill=\"clear\" (click)=\"connect()\">\r\n\t\t\t\t\t\t\t<ion-icon name=\"log-in\"></ion-icon>\r\n\t\t\t\t\t\t\t&nbsp; Connect\r\n\t\t\t\t\t\t</ion-button>\r\n\t\t\t\t\t</ion-buttons>\r\n\t\t\t\t</ion-item> -->\r\n\t</ion-list>\r\n</ion-card>\r\n",
                styles: [".config-version{font-size:.8em;opacity:.7}.extra-info{font-size:.95em;opacity:.7;padding-top:0;padding-bottom:0}.title{font-size:1.2em}ion-card{cursor:pointer}"]
            }] }
];
/** @nocollapse */
TapConnectionStoreItemComponent.ctorParameters = () => [
    { type: TapConnectionStoreService }
];
TapConnectionStoreItemComponent.propDecorators = {
    item: [{ type: Input }],
    selected: [{ type: Output }]
};
if (false) {
    /** @type {?} */
    TapConnectionStoreItemComponent.prototype.item;
    /** @type {?} */
    TapConnectionStoreItemComponent.prototype.selected;
    /**
     * @type {?}
     * @private
     */
    TapConnectionStoreItemComponent.prototype.tapConnectionStoreService;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFwLWNvbm5lY3Rpb24tc3RvcmUtaXRlbS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AaW90aXplL2lvbmljLyIsInNvdXJjZXMiOlsibGliL3RhcC1jb25uZWN0L3RhcC1jb25uZWN0aW9uLXN0b3JlL3RhcC1jb25uZWN0aW9uLXN0b3JlLWl0ZW0vdGFwLWNvbm5lY3Rpb24tc3RvcmUtaXRlbS5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBRSxLQUFLLEVBQVUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRy9FLE9BQU8sRUFBRSx5QkFBeUIsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBTzVFLE1BQU0sT0FBTywrQkFBK0I7Ozs7SUFNMUMsWUFBb0IseUJBQW9EO1FBQXBELDhCQUF5Q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