(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/serial', ['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.serial = {}), 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-serial-configuration-form/tap-serial-configuration-form.component.ts
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var TapSerialConfigurationFormComponent = /** @class */ (function () {
        function TapSerialConfigurationFormComponent(changeDetector, toastController) {
            this.changeDetector = changeDetector;
            this.toastController = toastController;
            this.SERIAL_SETTINGS_FIELDS = common.SERIAL_SETTINGS_FIELDS;
            this.valueChanges = new core.EventEmitter();
        }
        Object.defineProperty(TapSerialConfigurationFormComponent.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 {?}
         */
        TapSerialConfigurationFormComponent.prototype.onSerialSettingsChanged = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            console.log('Selected', event);
            this.valueChanges.emit(event);
        };
        TapSerialConfigurationFormComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'tap-serial-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: [""]
                    }] }
        ];
        /** @nocollapse */
        TapSerialConfigurationFormComponent.ctorParameters = function () { return [
            { type: core.ChangeDetectorRef },
            { type: angular.ToastController }
        ]; };
        TapSerialConfigurationFormComponent.propDecorators = {
            valueChanges: [{ type: core.Output }],
            values: [{ type: core.Input }]
        };
        return TapSerialConfigurationFormComponent;
    }());
    if (false) {
        /** @type {?} */
        TapSerialConfigurationFormComponent.prototype.SERIAL_SETTINGS_FIELDS;
        /** @type {?} */
        TapSerialConfigurationFormComponent.prototype.valueChanges;
        /** @type {?} */
        TapSerialConfigurationFormComponent.prototype.form;
        /** @type {?} */
        TapSerialConfigurationFormComponent.prototype.formValues;
        /**
         * @type {?}
         * @private
         */
        TapSerialConfigurationFormComponent.prototype.valueSub;
        /** @type {?} */
        TapSerialConfigurationFormComponent.prototype.changeDetector;
        /** @type {?} */
        TapSerialConfigurationFormComponent.prototype.toastController;
    }

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

    exports.TapSerialConfigurationFormComponent = TapSerialConfigurationFormComponent;
    exports.TapTargetSerialModule = TapTargetSerialModule;

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

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