/**
 * @fileoverview added by tsickle
 * Generated from: lib/tap-gpio.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import { Component, Input } from '@angular/core';
import { CurrentDeviceService } from '@iotize/ionic';
import { TapGPIOController } from './tap-extension';
var TapGpioComponent = /** @class */ (function () {
    function TapGpioComponent(tapService) {
        var _this = this;
        this.tapService = tapService;
        this.schema = [];
        this.lines = 'full';
        this.pins = this.schema.map((/**
         * @param {?} entry
         * @return {?}
         */
        function (entry) {
            if (entry.pin.type == 'GPIO') {
                ((/** @type {?} */ (entry))).controller = new TapGPIOController(_this.tap, entry.pin);
            }
            return (/** @type {?} */ (entry));
        }));
    }
    Object.defineProperty(TapGpioComponent.prototype, "tap", {
        get: /**
         * @return {?}
         */
        function () {
            return this.tapService.tap;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    TapGpioComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
    };
    TapGpioComponent.decorators = [
        { type: Component, args: [{
                    selector: 'tap-gpio',
                    template: "\r\n<ion-list [lines]=\"lines\">\r\n  <ion-item *ngFor=\"let config of pins\">\r\n    <ng-template [ngIf]=\"config.pin.type == 'GROUND'\" #ground>\r\n        <span slot=\"start\">{{config.num}}</span>\r\n        <ion-label>\r\n          <span slot=\"start\">{{config.pin.type}}</span>\r\n        </ion-label>\r\n    </ng-template>\r\n    <ng-template [ngIf]=\"config.pin.type == 'POWER'\" #power>\r\n        <span slot=\"start\">{{config.num}}</span>\r\n        <span slot=\"start\">{{config.pin.type}}</span>\r\n        <ion-label>\r\n          <span slot=\"start\">{{config.power}}V</span>\r\n        </ion-label>\r\n    </ng-template>\r\n    <ng-template [ngIf]=\"config.pin.type == 'DISABLED'\" #disabledpin>\r\n        <span slot=\"start\">{{config.num}}</span>\r\n        <ion-label>\r\n          <span slot=\"start\">{{config.pin.type}}</span>\r\n        </ion-label>\r\n    </ng-template>\r\n    <ng-template [ngIf]=\"config.pin.type == 'GPIO'\" #gpio>\r\n        <span slot=\"start\">{{config.num}}</span>\r\n        <span slot=\"start\">{{config.pin.type}} {{config.pin.num}}</span> \r\n        <ion-label>\r\n          {{config.title}}\r\n        </ion-label>\r\n        <ion-buttons slot=\"end\">\r\n            <ion-button [color]=\"config.controller._mode == 'OUT' ? 'primary' : ''\" (click)=\"config.controller.setup('OUT')\">OUT</ion-button>\r\n            <ion-button (click)=\"config.controller.read()\">READ</ion-button>\r\n        </ion-buttons>\r\n        <ion-buttons slot=\"end\">\r\n            <ion-button [color]=\"config.controller._mode == 'IN' ? 'primary' : ''\" (click)=\"config.controller.setup('IN')\">IN</ion-button>\r\n            <!-- <ion-toggle (click)=\"config.controller.toggle()\"></ion-toggle> -->\r\n            <ion-button [color]=\"config.controller._state == 'LOW' ? 'primary': ''\" (click)=\"config.controller.low()\">LOW</ion-button>\r\n            <ion-button [color]=\"config.controller._state == 'HIGH' ? 'primary': ''\" (click)=\"config.controller.high()\">HIGH</ion-button>\r\n        </ion-buttons>\r\n    </ng-template>\r\n  </ion-item>\r\n</ion-list>",
                    styles: [""]
                }] }
    ];
    /** @nocollapse */
    TapGpioComponent.ctorParameters = function () { return [
        { type: CurrentDeviceService }
    ]; };
    TapGpioComponent.propDecorators = {
        schema: [{ type: Input }],
        lines: [{ type: Input }]
    };
    return TapGpioComponent;
}());
export { TapGpioComponent };
if (false) {
    /** @type {?} */
    TapGpioComponent.prototype.schema;
    /** @type {?} */
    TapGpioComponent.prototype.lines;
    /** @type {?} */
    TapGpioComponent.prototype.pins;
    /** @type {?} */
    TapGpioComponent.prototype.tapService;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFwLWdwaW8uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGlvdGl6ZS9pb25pYy9ncGlvLyIsInNvdXJjZXMiOlsibGliL3RhcC1ncGlvLmNvbXBvbmVudC50cyJdL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