/**
 * @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';
var TapConnectionStoreItemComponent = /** @class */ (function () {
    function TapConnectionStoreItemComponent(tapConnectionStoreService) {
        this.tapConnectionStoreService = tapConnectionStoreService;
        this.selected = new EventEmitter();
    }
    /**
     * @return {?}
     */
    TapConnectionStoreItemComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
    };
    /**
     * @return {?}
     */
    TapConnectionStoreItemComponent.prototype.connect = /**
     * @return {?}
     */
    function () {
        if (this.item) {
            this.selected.emit(this.item);
        }
    };
    /**
     * @return {?}
     */
    TapConnectionStoreItemComponent.prototype.remove = /**
     * @return {?}
     */
    function () {
        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 = function () { return [
        { type: TapConnectionStoreService }
    ]; };
    TapConnectionStoreItemComponent.propDecorators = {
        item: [{ type: Input }],
        selected: [{ type: Output }]
    };
    return TapConnectionStoreItemComponent;
}());
export { TapConnectionStoreItemComponent };
if (false) {
    /** @type {?} */
    TapConnectionStoreItemComponent.prototype.item;
    /** @type {?} */
    TapConnectionStoreItemComponent.prototype.selected;
    /**
     * @type {?}
     * @private
     */
    TapConnectionStoreItemComponent.prototype.tapConnectionStoreService;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFwLWNvbm5lY3Rpb24tc3RvcmUtaXRlbS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AaW90aXplL2lvbmljLyIsInNvdXJjZXMiOlsibGliL3RhcC1jb25uZWN0L3RhcC1jb25uZWN0aW9uLXN0b3JlL3RhcC1jb25uZWN0aW9uLXN0b3JlLWl0ZW0vdGFwLWNvbm5lY3Rpb24tc3RvcmUtaXRlbS5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBRSxLQUFLLEVBQVUsTUFBTSxFQU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