/*
    *
    * Wijmo Library 5.20183.550
    * 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/
    *
    */
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const wjcCore=require("wijmo/wijmo");var __glob="undefined"!=typeof window?window:self;const core_1=require("@angular/core"),core_2=require("@angular/core"),core_3=require("@angular/core"),ngCore=require("@angular/core"),common_1=require("@angular/common"),wijmo_angular2_directiveBase_1=require("wijmo/wijmo.angular2.directiveBase");exports.wjTooltipMeta={selector:"[wjTooltip]",inputs:[],outputs:["initialized"],exportAs:"wjTooltip",providers:[]};class WjTooltip{constructor(e,o,t){this.isInitialized=!1;this._wjBehaviour=wijmo_angular2_directiveBase_1.WjDirectiveBehavior.attach(this,e,o,t);this._elRef=e,WjTooltip._toolTip||(WjTooltip._toolTip=new wjcCore.Tooltip),this.created()}created(){}ngOnInit(){this._wjBehaviour.ngOnInit()}ngAfterViewInit(){this._wjBehaviour.ngAfterViewInit()}ngOnDestroy(){this._wjBehaviour.ngOnDestroy(),this.wjTooltip=null}get wjTooltip(){return this._toolTipText}set wjTooltip(e){this._toolTipText!=e&&(this._toolTipText,WjTooltip._toolTip.setTooltip(this._elRef.nativeElement,e))}}WjTooltip.meta={outputs:exports.wjTooltipMeta.outputs},WjTooltip.decorators=[{type:core_2.Directive,args:[{selector:exports.wjTooltipMeta.selector,inputs:exports.wjTooltipMeta.inputs,outputs:exports.wjTooltipMeta.outputs,exportAs:exports.wjTooltipMeta.exportAs,providers:[{provide:"WjComponent",useExisting:core_2.forwardRef(()=>WjTooltip)},...exports.wjTooltipMeta.providers]}]}],WjTooltip.ctorParameters=(()=>[{type:core_2.ElementRef,decorators:[{type:core_3.Inject,args:[core_2.ElementRef]}]},{type:core_2.Injector,decorators:[{type:core_3.Inject,args:[core_2.Injector]}]},{type:void 0,decorators:[{type:core_3.Inject,args:["WjComponent"]},{type:core_3.SkipSelf},{type:core_2.Optional}]}]),WjTooltip.propDecorators={wjTooltip:[{type:core_3.Input}]},exports.WjTooltip=WjTooltip;class WjComponentLoader{constructor(e,o){this._cmpResolver=e,this._elementRef=o,this._isInit=!1,this.propertiesChange=new ngCore.EventEmitter}get component(){return this._component}set component(e){this._component!==e&&(this._component=e,this._createComponent())}get properties(){return this._properties}set properties(e){this._properties=e,this._updateProperties()}ngOnInit(){this._isInit=!0,this._createComponent()}_createComponent(){if(this._isInit){this._cmpRef&&(this._cmpRef.destroy(),this._cmpRef=null);let e=this._component;e&&this._anchor&&(this._cmpRef=this._anchor.createComponent(this._cmpResolver.resolveComponentFactory(e)),this._updateProperties())}}_updateProperties(){let e=this._cmpRef&&this._cmpRef.instance,o=this.properties;if(e&&o){let t=Object.getOwnPropertyNames(o);for(let r of t){e[r]=o[r];let t=e[r+"Change"];t instanceof core_1.EventEmitter&&this._addPropListener(e,r,t)}}}_addPropListener(e,o,t){t.subscribe(t=>{this.properties[o]=this.properties[o]=e[o],this.propertiesChange.next(this.properties)})}}WjComponentLoader.decorators=[{type:core_1.Component,args:[{selector:"wj-component-loader",template:`<div #anchor></div>`,inputs:["component","properties"],outputs:["propertiesChange"]}]}],WjComponentLoader.ctorParameters=(()=>[{type:core_1.ComponentFactoryResolver,decorators:[{type:core_3.Inject,args:[core_1.ComponentFactoryResolver]}]},{type:core_2.ElementRef,decorators:[{type:core_3.Inject,args:[core_2.ElementRef]}]}]),WjComponentLoader.propDecorators={_anchor:[{type:core_1.ViewChild,args:["anchor",{read:core_2.ViewContainerRef}]}]},exports.WjComponentLoader=WjComponentLoader;let moduleExports=[WjTooltip,WjComponentLoader];class WjCoreModule{}WjCoreModule.decorators=[{type:core_1.NgModule,args:[{imports:[wijmo_angular2_directiveBase_1.WjDirectiveBaseModule,common_1.CommonModule],declarations:[...moduleExports],exports:[...moduleExports]}]}],WjCoreModule.ctorParameters=(()=>[]),exports.WjCoreModule=WjCoreModule;