/*
    *
    * 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 wjcGridDetail=require("wijmo/wijmo.grid.detail");var __glob="undefined"!=typeof window?window:self;const core_1=require("@angular/core"),core_2=require("@angular/core"),core_3=require("@angular/core"),common_1=require("@angular/common"),wijmo_angular2_directiveBase_1=require("wijmo/wijmo.angular2.directiveBase");exports.wjFlexGridDetailMeta={selector:"[wjFlexGridDetail]",inputs:["wjFlexGridDetail","maxHeight","detailVisibilityMode","rowHasDetail","isAnimated"],outputs:["initialized"],exportAs:"wjFlexGridDetail",providers:[]};class WjFlexGridDetail extends wjcGridDetail.FlexGridDetailProvider{constructor(e,t,r,i,o,a){super(r),this.isInitialized=!1;this._wjBehaviour=wijmo_angular2_directiveBase_1.WjDirectiveBehavior.attach(this,e,t,r);this._viewContainerRef=i,this._templateRef=o,this._domRenderer=a,this._init(),this.created()}created(){}ngOnInit(){this._wjBehaviour.ngOnInit()}ngAfterViewInit(){this._wjBehaviour.ngAfterViewInit()}ngOnDestroy(){this._wjBehaviour.ngOnDestroy()}_init(){this.createDetailCell=((e,t)=>{let r=wijmo_angular2_directiveBase_1.WjDirectiveBehavior.instantiateTemplate(this.grid.hostElement,this._viewContainerRef,this._templateRef,this._domRenderer,!1,{row:e,col:t,item:e.dataItem}),i=r.viewRef,o=r.rootElement;return i.detectChanges(),o.parentElement.removeChild(o),o[WjFlexGridDetail._viewRefProp]=i,o}),this.disposeDetailCell=(e=>{let t;if(e.detail&&(t=e.detail[WjFlexGridDetail._viewRefProp])){e.detail[WjFlexGridDetail._viewRefProp]=null;let r=this._viewContainerRef.indexOf(t);r>-1&&this._viewContainerRef.remove(r)}})}}WjFlexGridDetail._viewRefProp="__wj_viewRef",WjFlexGridDetail.meta={outputs:exports.wjFlexGridDetailMeta.outputs},WjFlexGridDetail.decorators=[{type:core_2.Directive,args:[{selector:exports.wjFlexGridDetailMeta.selector,inputs:exports.wjFlexGridDetailMeta.inputs,outputs:exports.wjFlexGridDetailMeta.outputs,exportAs:exports.wjFlexGridDetailMeta.exportAs,providers:[{provide:"WjComponent",useExisting:core_2.forwardRef(()=>WjFlexGridDetail)},...exports.wjFlexGridDetailMeta.providers]}]}],WjFlexGridDetail.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}]},{type:core_2.ViewContainerRef,decorators:[{type:core_3.Inject,args:[core_2.ViewContainerRef]}]},{type:core_2.TemplateRef,decorators:[{type:core_3.Inject,args:[core_2.TemplateRef]}]},{type:core_2.Renderer,decorators:[{type:core_3.Inject,args:[core_2.Renderer]}]}]),exports.WjFlexGridDetail=WjFlexGridDetail;let moduleExports=[WjFlexGridDetail];class WjGridDetailModule{}WjGridDetailModule.decorators=[{type:core_1.NgModule,args:[{imports:[wijmo_angular2_directiveBase_1.WjDirectiveBaseModule,common_1.CommonModule],declarations:[...moduleExports],exports:[...moduleExports]}]}],WjGridDetailModule.ctorParameters=(()=>[]),exports.WjGridDetailModule=WjGridDetailModule;