/*
    *
    * Wijmo Library 5.20181.436
    * http://wijmo.com/
    *
    * Copyright(c) GrapeCity, Inc.  All rights reserved.
    *
    * Licensed under the GrapeCity Commercial License.
    * sales@wijmo.com
    * wijmo.com/products/wijmo-5/license/
    *
    */
System.register(["wijmo/wijmo","@angular/core","@angular/common","wijmo/wijmo.angular2.directiveBase"],function(t,e){"use strict";var o,r,n,i,p,s,c,a,u,f,l,h;e&&e.id;return{setters:[function(t){o=t},function(t){r=t,n=t,i=t,p=t},function(t){s=t},function(t){c=t}],execute:function(){t("wjTooltipMeta",a={selector:"[wjTooltip]",inputs:[],outputs:["initialized"],exportAs:"wjTooltip",providers:[]}),u=function(){function t(e,r,n){this.isInitialized=!1;this._wjBehaviour=c.WjDirectiveBehavior.attach(this,e,r,n);this._elRef=e,t._toolTip||(t._toolTip=new o.Tooltip),this.created()}return t.prototype.created=function(){},t.prototype.ngOnInit=function(){this._wjBehaviour.ngOnInit()},t.prototype.ngAfterViewInit=function(){this._wjBehaviour.ngAfterViewInit()},t.prototype.ngOnDestroy=function(){this._wjBehaviour.ngOnDestroy(),this.wjTooltip=null},Object.defineProperty(t.prototype,"wjTooltip",{get:function(){return this._toolTipText},set:function(e){this._toolTipText!=e&&(this._toolTipText,t._toolTip.setTooltip(this._elRef.nativeElement,e))},enumerable:!0,configurable:!0}),t.meta={outputs:a.outputs},t.decorators=[{type:n.Directive,args:[{selector:a.selector,inputs:a.inputs,outputs:a.outputs,exportAs:a.exportAs,providers:[{provide:"WjComponent",useExisting:n.forwardRef(function(){return t})}].concat(a.providers)}]}],t.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:i.Inject,args:[n.ElementRef]}]},{type:n.Injector,decorators:[{type:i.Inject,args:[n.Injector]}]},{type:void 0,decorators:[{type:i.Inject,args:["WjComponent"]},{type:i.SkipSelf},{type:n.Optional}]}]},t.propDecorators={wjTooltip:[{type:i.Input}]},t}(),t("WjTooltip",u),f=function(){function t(t,e){this._cmpResolver=t,this._elementRef=e,this._isInit=!1,this.propertiesChange=new p.EventEmitter}return Object.defineProperty(t.prototype,"component",{get:function(){return this._component},set:function(t){this._component!==t&&(this._component=t,this._createComponent())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"properties",{get:function(){return this._properties},set:function(t){this._properties=t,this._updateProperties()},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this._isInit=!0,this._createComponent()},t.prototype._createComponent=function(){if(this._isInit){this._cmpRef&&(this._cmpRef.destroy(),this._cmpRef=null);var t=this._component;t&&this._anchor&&(this._cmpRef=this._anchor.createComponent(this._cmpResolver.resolveComponentFactory(t)),this._updateProperties())}},t.prototype._updateProperties=function(){var t=this._cmpRef&&this._cmpRef.instance,e=this.properties;if(t&&e)for(var o=0,n=Object.getOwnPropertyNames(e);o<n.length;o++){var i=n[o];t[i]=e[i];var p=t[i+"Change"];p instanceof r.EventEmitter&&this._addPropListener(t,i,p)}},t.prototype._addPropListener=function(t,e,o){var r=this;o.subscribe(function(o){r.properties[e]=r.properties[e]=t[e],r.propertiesChange.next(r.properties)})},t.decorators=[{type:r.Component,args:[{selector:"wj-component-loader",template:"<div #anchor></div>",inputs:["component","properties"],outputs:["propertiesChange"]}]}],t.ctorParameters=function(){return[{type:r.ComponentFactoryResolver,decorators:[{type:i.Inject,args:[r.ComponentFactoryResolver]}]},{type:n.ElementRef,decorators:[{type:i.Inject,args:[n.ElementRef]}]}]},t.propDecorators={_anchor:[{type:r.ViewChild,args:["anchor",{read:n.ViewContainerRef}]}]},t}(),t("WjComponentLoader",f),l=[u,f],h=function(){function t(){}return t.decorators=[{type:r.NgModule,args:[{imports:[c.WjDirectiveBaseModule,s.CommonModule],declarations:l.slice(),exports:l.slice()}]}],t.ctorParameters=function(){return[]},t}(),t("WjCoreModule",h)}}});