(function (global, factory) {
    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@ionic/angular'), require('@iotize/ionic/target/common')) :
    typeof define === 'function' && define.amd ? define('@iotize/ionic/target/modbus', ['exports', '@angular/core', '@angular/forms', '@ionic/angular', '@iotize/ionic/target/common'], factory) :
    (global = global || self, factory((global.iotize = global.iotize || {}, global.iotize.ionic = global.iotize.ionic || {}, global.iotize.ionic.target = global.iotize.ionic.target || {}, global.iotize.ionic.target.modbus = {}), global.ng.core, global.ng.forms, global.angular, global.iotize.ionic.target.common));
}(this, (function (exports, core, forms, angular, common) { 'use strict';

    /**
     * @fileoverview added by tsickle
     * Generated from: lib/tap-modbus-configuration-form/tap-modbus-configuration-form.component.ts
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var TapModbusConfigurationFormComponent = /** @class */ (function () {
        function TapModbusConfigurationFormComponent(alertCtrl, loadingCtrl, changeDetector) {
            this.alertCtrl = alertCtrl;
            this.loadingCtrl = loadingCtrl;
            this.changeDetector = changeDetector;
            this.SERIAL_SETTINGS_FIELDS = common.MODBUS_SETTINGS_FIELDS;
            this.valueChanges = new core.EventEmitter();
        }
        Object.defineProperty(TapModbusConfigurationFormComponent.prototype, "values", {
            set: /**
             * @param {?} obs
             * @return {?}
             */
            function (obs) {
                var _this = this;
                var _a;
                (_a = this.valueSub) === null || _a === void 0 ? void 0 : _a.unsubscribe();
                this.valueSub = obs === null || obs === void 0 ? void 0 : obs.subscribe((/**
                 * @param {?} newValue
                 * @return {?}
                 */
                function (newValue) {
                    _this.formValues = newValue;
                }));
            },
            enumerable: true,
            configurable: true
        });
        /**
         * @param {?} event
         * @return {?}
         */
        TapModbusConfigurationFormComponent.prototype.onSerialSettingsChanged = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            console.log('Onsettings changed', event);
            this.valueChanges.emit(event);
        };
        TapModbusConfigurationFormComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'tap-modbus-configuration-form',
                        template: "<tap-protocol-configuration-form\r\n  [values]=\"formValues\"\r\n  (valueChanges)=\"onSerialSettingsChanged($event)\"\r\n  [fields]=\"SERIAL_SETTINGS_FIELDS\">\r\n</tap-protocol-configuration-form>",
                        styles: ["ion-input{text-align:right}"]
                    }] }
        ];
        /** @nocollapse */
        TapModbusConfigurationFormComponent.ctorParameters = function () { return [
            { type: angular.AlertController },
            { type: angular.LoadingController },
            { type: core.ChangeDetectorRef }
        ]; };
        TapModbusConfigurationFormComponent.propDecorators = {
            valueChanges: [{ type: core.Output }],
            values: [{ type: core.Input }]
        };
        return TapModbusConfigurationFormComponent;
    }());
    if (false) {
        /** @type {?} */
        TapModbusConfigurationFormComponent.prototype.SERIAL_SETTINGS_FIELDS;
        /** @type {?} */
        TapModbusConfigurationFormComponent.prototype.valueChanges;
        /** @type {?} */
        TapModbusConfigurationFormComponent.prototype.formValues;
        /**
         * @type {?}
         * @private
         */
        TapModbusConfigurationFormComponent.prototype.valueSub;
        /** @type {?} */
        TapModbusConfigurationFormComponent.prototype.form;
        /** @type {?} */
        TapModbusConfigurationFormComponent.prototype.alertCtrl;
        /** @type {?} */
        TapModbusConfigurationFormComponent.prototype.loadingCtrl;
        /** @type {?} */
        TapModbusConfigurationFormComponent.prototype.changeDetector;
    }

    /**
     * @fileoverview added by tsickle
     * Generated from: lib/tap-target-modbus.module.ts
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var TapTargetModbusModule = /** @class */ (function () {
        function TapTargetModbusModule() {
        }
        TapTargetModbusModule.decorators = [
            { type: core.NgModule, args: [{
                        declarations: [
                            TapModbusConfigurationFormComponent
                        ],
                        exports: [
                            TapModbusConfigurationFormComponent
                        ],
                        imports: [
                            angular.IonicModule,
                            forms.FormsModule,
                            forms.ReactiveFormsModule,
                            common.TapProtocolConfigurationModule
                        ]
                    },] }
        ];
        return TapTargetModbusModule;
    }());

    exports.TapModbusConfigurationFormComponent = TapModbusConfigurationFormComponent;
    exports.TapTargetModbusModule = TapTargetModbusModule;

    Object.defineProperty(exports, '__esModule', { value: true });

})));
//# sourceMappingURL=iotize-ionic-target-modbus.umd.js.map
