/**
 * This file is generated by the Angular 2 template compiler.
 * Do not edit.
 */
 /* tslint:disable */

import * as import0 from '@angular/core/src/render/api';
import * as import1 from '@angular/core/src/linker/view';
import * as import2 from '@angular/core/src/linker/element';
import * as import3 from './modal-component';
import * as import4 from '@angular/core/src/linker/view_utils';
import * as import5 from '@angular/core/src/di/injector';
import * as import6 from '@angular/core/src/linker/view_type';
import * as import7 from '@angular/core/src/change_detection/change_detection';
import * as import8 from '@angular/core/src/linker/component_factory_resolver';
import * as import9 from '../../navigation/nav-params';
import * as import10 from '../../navigation/view-controller';
import * as import11 from '@angular/core/src/metadata/view';
import * as import12 from '@angular/core/src/linker/component_factory';
import * as import13 from '@angular/core/src/linker/query_list';
import * as import14 from '../backdrop/backdrop';
import * as import15 from '../../gestures/gesture-controller';
import * as import16 from '@angular/core/src/linker/element_ref';
var renderType_ModalCmp_Host:import0.RenderComponentType = (null as any);
class _View_ModalCmp_Host0 extends import1.AppView<any> {
  _el_0:any;
  /*private*/ _appEl_0:import2.AppElement;
  _ModalCmp_0_4:import3.ModalCmp;
  constructor(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement) {
    super(_View_ModalCmp_Host0,renderType_ModalCmp_Host,import6.ViewType.HOST,viewUtils,parentInjector,declarationEl,import7.ChangeDetectorStatus.CheckAlways);
  }
  createInternal(rootSelector:string):import2.AppElement {
    this._el_0 = this.selectOrCreateHostElement('ion-modal',rootSelector,(null as any));
    this._appEl_0 = new import2.AppElement(0,(null as any),this,this._el_0);
    var compView_0:any = viewFactory_ModalCmp0(this.viewUtils,this.injector(0),this._appEl_0);
    this._ModalCmp_0_4 = new import3.ModalCmp(this.parentInjector.get(import8.ComponentFactoryResolver),this.renderer,this.parentInjector.get(import9.NavParams),this.parentInjector.get(import10.ViewController));
    this._appEl_0.initComponent(this._ModalCmp_0_4,[],compView_0);
    compView_0.create(this._ModalCmp_0_4,this.projectableNodes,(null as any));
    var disposable_0:Function = this.renderer.listenGlobal('body','keyup',this.eventHandler(this._handle_keyup_0_0.bind(this)));
    this.init([].concat([this._el_0]),[this._el_0],[disposable_0],[]);
    return this._appEl_0;
  }
  injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any {
    if (((token === import3.ModalCmp) && (0 === requestNodeIndex))) { return this._ModalCmp_0_4; }
    return notFoundResult;
  }
  detectChangesInternal(throwOnChange:boolean):void {
    this.detectContentChildrenChanges(throwOnChange);
    this.detectViewChildrenChanges(throwOnChange);
    if (!throwOnChange) { if ((this.numberOfChecks === 0)) { this._ModalCmp_0_4.ngAfterViewInit(); } }
  }
  private _handle_keyup_0_0($event:any):boolean {
    this._appEl_0.componentView.markPathToRootAsCheckOnce();
    const pd_0:any = ((<any>this._ModalCmp_0_4._keyUp($event)) !== false);
    return (true && pd_0);
  }
}
function viewFactory_ModalCmp_Host0(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement):import1.AppView<any> {
  if ((renderType_ModalCmp_Host === (null as any))) { (renderType_ModalCmp_Host = viewUtils.createRenderComponentType('',0,import11.ViewEncapsulation.None,[],{})); }
  return new _View_ModalCmp_Host0(viewUtils,parentInjector,declarationEl);
}
export const ModalCmpNgFactory:import12.ComponentFactory<import3.ModalCmp> = new import12.ComponentFactory<import3.ModalCmp>('ion-modal',viewFactory_ModalCmp_Host0,import3.ModalCmp);
const styles_ModalCmp:any[] = [];
var renderType_ModalCmp:import0.RenderComponentType = (null as any);
class _View_ModalCmp0 extends import1.AppView<import3.ModalCmp> {
  _viewQuery_viewport_0:import13.QueryList<any>;
  _el_0:any;
  _Backdrop_0_3:import14.Backdrop;
  _el_1:any;
  _el_2:any;
  /*private*/ _appEl_2:import2.AppElement;
  /*private*/ _expr_1:any;
  constructor(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement) {
    super(_View_ModalCmp0,renderType_ModalCmp,import6.ViewType.COMPONENT,viewUtils,parentInjector,declarationEl,import7.ChangeDetectorStatus.CheckAlways);
  }
  createInternal(rootSelector:string):import2.AppElement {
    const parentRenderNode:any = this.renderer.createViewRoot(this.declarationAppElement.nativeElement);
    this._viewQuery_viewport_0 = new import13.QueryList<any>();
    this._el_0 = this.renderer.createElement(parentRenderNode,'ion-backdrop',(null as any));
    this.renderer.setElementAttribute(this._el_0,'disable-activated','');
    this.renderer.setElementAttribute(this._el_0,'disableScroll','false');
    this.renderer.setElementAttribute(this._el_0,'role','presentation');
    this.renderer.setElementAttribute(this._el_0,'tappable','');
    this._Backdrop_0_3 = new import14.Backdrop(this.parentInjector.get(import15.GestureController),new import16.ElementRef(this._el_0));
    this._el_1 = this.renderer.createElement(parentRenderNode,'div',(null as any));
    this.renderer.setElementAttribute(this._el_1,'class','modal-wrapper');
    this._el_2 = this.renderer.createElement(this._el_1,'div',(null as any));
    this.renderer.setElementAttribute(this._el_2,'nav-viewport','');
    this._appEl_2 = new import2.AppElement(2,1,this,this._el_2);
    var disposable_0:Function = this.renderer.listen(this._el_0,'click',this.eventHandler(this._handle_click_0_0.bind(this)));
    this._expr_1 = import7.UNINITIALIZED;
    this._viewQuery_viewport_0.reset([this._appEl_2.vcRef]);
    this.context._viewport = this._viewQuery_viewport_0.first;
    this.init([],[
      this._el_0,
      this._el_1,
      this._el_2
    ]
    ,[disposable_0],[]);
    return (null as any);
  }
  injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any {
    if (((token === import14.Backdrop) && (0 === requestNodeIndex))) { return this._Backdrop_0_3; }
    return notFoundResult;
  }
  detectChangesInternal(throwOnChange:boolean):void {
    const currVal_1:any = 'false';
    if (import4.checkBinding(throwOnChange,this._expr_1,currVal_1)) {
      this._Backdrop_0_3.disableScroll = currVal_1;
      this._expr_1 = currVal_1;
    }
    if (((this.numberOfChecks === 0) && !throwOnChange)) { this._Backdrop_0_3.ngOnInit(); }
    this.detectContentChildrenChanges(throwOnChange);
    this.detectViewChildrenChanges(throwOnChange);
  }
  destroyInternal():void {
    this._Backdrop_0_3.ngOnDestroy();
  }
  private _handle_click_0_0($event:any):boolean {
    this.markPathToRootAsCheckOnce();
    const pd_0:any = ((<any>this.context._bdClick()) !== false);
    return (true && pd_0);
  }
}
export function viewFactory_ModalCmp0(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement):import1.AppView<import3.ModalCmp> {
  if ((renderType_ModalCmp === (null as any))) { (renderType_ModalCmp = viewUtils.createRenderComponentType('/Users/dan/Dev/ionic2-build/dist/ionic-angular/components/modal/modal-component.ts class ModalCmp - inline template',0,import11.ViewEncapsulation.None,styles_ModalCmp,{})); }
  return new _View_ModalCmp0(viewUtils,parentInjector,declarationEl);
}