!function(t,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@angular/core"),require("@angular/forms"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("demo-form",["exports","@angular/core","@angular/forms","rxjs","rxjs/operators"],o):o((t="undefined"!=typeof globalThis?globalThis:t||self)["demo-form"]={},t.ng.core,t.ng.forms,t.rxjs,t.rxjs.operators)}(this,(function(t,o,e,n,r){"use strict";var i={provide:e.NG_VALUE_ACCESSOR,useExisting:o.forwardRef((function(){return s})),multi:!0},s=function(){function t(){this.destroy$=new n.Subject,this.control=new e.FormControl}return Object.defineProperty(t.prototype,"formControl",{set:function(t){this.control=t},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){},t.prototype.ngAfterViewInit=function(){var t=this;this.control.valueChanges.pipe(r.takeUntil(this.destroy$)).subscribe((function(o){return t.noticeValueChange(o)}))},t.prototype.noticeValueChange=function(t){this.onChange&&this.onChange(t)},t.prototype.writeValue=function(t){this.control.setValue(t)},t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){var o,e;t?null===(o=this.control)||void 0===o||o.disable():null===(e=this.control)||void 0===e||e.enable()},t.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},t}();s.decorators=[{type:o.Component,args:[{selector:"lib-fb-input",template:'<input\r\n  class="fb-input"\r\n  type="text"\r\n  placeholder="{{placeholder}}"\r\n  [formControl]="control"\r\n/>\r\n',providers:[i],styles:[".fb-input{background:#f2f2f2;border:0;box-sizing:border-box;font-family:Roboto,sans-serif;font-size:14px;margin:0 0 15px;outline:0;padding:15px;width:100%}"]}]}],s.ctorParameters=function(){return[]},s.propDecorators={placeholder:[{type:o.Input}],formControl:[{type:o.Input,args:["formControl"]}]};var u={provide:e.NG_VALUE_ACCESSOR,useExisting:o.forwardRef((function(){return p})),multi:!0},p=function(){function t(){this.destroy$=new n.Subject,this.control=new e.FormControl}return Object.defineProperty(t.prototype,"formControl",{set:function(t){this.control=t},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){},t.prototype.ngAfterViewInit=function(){var t=this;this.control.valueChanges.pipe(r.takeUntil(this.destroy$)).subscribe((function(o){return t.noticeValueChange(o)}))},t.prototype.noticeValueChange=function(t){this.onChange&&this.onChange(t)},t.prototype.writeValue=function(t){this.control.setValue(t)},t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){var o,e;t?null===(o=this.control)||void 0===o||o.disable():null===(e=this.control)||void 0===e||e.enable()},t.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},t}();p.decorators=[{type:o.Component,args:[{selector:"lib-fb-password-input",template:'<input\r\n  class="fb-input"\r\n  type="password"\r\n  placeholder="{{placeholder}}"\r\n  [formControl]="control"\r\n/>\r\n',providers:[u],styles:[".fb-input{background:#f2f2f2;border:0;box-sizing:border-box;font-family:Roboto,sans-serif;font-size:14px;margin:0 0 15px;outline:0;padding:15px;width:100%}"]}]}],p.ctorParameters=function(){return[]},p.propDecorators={placeholder:[{type:o.Input}],formControl:[{type:o.Input,args:["formControl"]}]};var a=function(){function t(){this.buttonClick=new o.EventEmitter}return t.prototype.ngOnInit=function(){},t}();a.decorators=[{type:o.Component,args:[{selector:"lib-fb-button",template:'<button class="fb-button" (click)="buttonClick.emit()">\r\n  <ng-content></ng-content>\r\n</button>\r\n',styles:[".fb-button{background:#4caf50;border:0;color:#fff;cursor:pointer;font-family:Roboto,sans-serif;font-size:14px;outline:0;padding:15px;text-transform:uppercase;transition:all .3 ease;width:100%}"]}]}],a.ctorParameters=function(){return[]},a.propDecorators={buttonClick:[{type:o.Output}]};var l=function(){function t(){}return t.forRoot=function(){return{ngModule:t,providers:[]}},t}();l.decorators=[{type:o.NgModule,args:[{declarations:[a,s,p],imports:[e.FormsModule,e.ReactiveFormsModule],exports:[a,s,p]}]}],t.DemoFormModule=l,t.FbButtonComponent=a,t.FbInputComponent=s,t.FbPasswordInputComponent=p,t.MY_INPUT_CONTROL_VALUE_ACCESSOR=i,t.MY_PASSWORD_INPUT_CONTROL_VALUE_ACCESSOR=u,Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=demo-form.umd.min.js.map