/**
 * 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 './loading-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 '../../navigation/view-controller';
import * as import9 from '../../config/config';
import * as import10 from '@angular/core/src/linker/element_ref';
import * as import11 from '../../navigation/nav-params';
import * as import12 from '@angular/core/src/metadata/view';
import * as import13 from '@angular/core/src/linker/component_factory';
import * as import14 from '../backdrop/backdrop';
import * as import15 from '@angular/common/src/directives/ng_if';
import * as import16 from '../../gestures/gesture-controller';
import * as import17 from '@angular/core/src/linker/template_ref';
import * as import18 from '../spinner/spinner';
import * as import19 from '../spinner/spinner.ngfactory';
import * as import20 from '@angular/core/src/security';
var renderType_LoadingCmp_Host:import0.RenderComponentType = (null as any);
class _View_LoadingCmp_Host0 extends import1.AppView<any> {
  _el_0:any;
  /*private*/ _appEl_0:import2.AppElement;
  _LoadingCmp_0_4:import3.LoadingCmp;
  constructor(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement) {
    super(_View_LoadingCmp_Host0,renderType_LoadingCmp_Host,import6.ViewType.HOST,viewUtils,parentInjector,declarationEl,import7.ChangeDetectorStatus.CheckAlways);
  }
  createInternal(rootSelector:string):import2.AppElement {
    this._el_0 = this.selectOrCreateHostElement('ion-loading',rootSelector,(null as any));
    this.renderer.setElementAttribute(this._el_0,'role','dialog');
    this._appEl_0 = new import2.AppElement(0,(null as any),this,this._el_0);
    var compView_0:any = viewFactory_LoadingCmp0(this.viewUtils,this.injector(0),this._appEl_0);
    this._LoadingCmp_0_4 = new import3.LoadingCmp(this.parentInjector.get(import8.ViewController),this.parentInjector.get(import9.Config),new import10.ElementRef(this._el_0),this.parentInjector.get(import11.NavParams),this.renderer);
    this._appEl_0.initComponent(this._LoadingCmp_0_4,[],compView_0);
    compView_0.create(this._LoadingCmp_0_4,this.projectableNodes,(null as any));
    this.init([].concat([this._el_0]),[this._el_0],[],[]);
    return this._appEl_0;
  }
  injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any {
    if (((token === import3.LoadingCmp) && (0 === requestNodeIndex))) { return this._LoadingCmp_0_4; }
    return notFoundResult;
  }
  detectChangesInternal(throwOnChange:boolean):void {
    if (((this.numberOfChecks === 0) && !throwOnChange)) { this._LoadingCmp_0_4.ngOnInit(); }
    this.detectContentChildrenChanges(throwOnChange);
    this.detectViewChildrenChanges(throwOnChange);
  }
}
function viewFactory_LoadingCmp_Host0(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement):import1.AppView<any> {
  if ((renderType_LoadingCmp_Host === (null as any))) { (renderType_LoadingCmp_Host = viewUtils.createRenderComponentType('',0,import12.ViewEncapsulation.None,[],{})); }
  return new _View_LoadingCmp_Host0(viewUtils,parentInjector,declarationEl);
}
export const LoadingCmpNgFactory:import13.ComponentFactory<import3.LoadingCmp> = new import13.ComponentFactory<import3.LoadingCmp>('ion-loading',viewFactory_LoadingCmp_Host0,import3.LoadingCmp);
const styles_LoadingCmp:any[] = [];
var renderType_LoadingCmp:import0.RenderComponentType = (null as any);
class _View_LoadingCmp0 extends import1.AppView<import3.LoadingCmp> {
  _el_0:any;
  _Backdrop_0_3:import14.Backdrop;
  _el_1:any;
  _anchor_2:any;
  /*private*/ _appEl_2:import2.AppElement;
  _TemplateRef_2_5:any;
  _NgIf_2_6:import15.NgIf;
  _anchor_3:any;
  /*private*/ _appEl_3:import2.AppElement;
  _TemplateRef_3_5:any;
  _NgIf_3_6:import15.NgIf;
  /*private*/ _expr_0:any;
  /*private*/ _expr_1:any;
  /*private*/ _expr_2:any;
  constructor(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement) {
    super(_View_LoadingCmp0,renderType_LoadingCmp,import6.ViewType.COMPONENT,viewUtils,parentInjector,declarationEl,import7.ChangeDetectorStatus.CheckAlways);
  }
  createInternal(rootSelector:string):import2.AppElement {
    const parentRenderNode:any = this.renderer.createViewRoot(this.declarationAppElement.nativeElement);
    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,'role','presentation');
    this.renderer.setElementAttribute(this._el_0,'tappable','');
    this._Backdrop_0_3 = new import14.Backdrop(this.parentInjector.get(import16.GestureController),new import10.ElementRef(this._el_0));
    this._el_1 = this.renderer.createElement(parentRenderNode,'div',(null as any));
    this.renderer.setElementAttribute(this._el_1,'class','loading-wrapper');
    this._anchor_2 = this.renderer.createTemplateAnchor(this._el_1,(null as any));
    this._appEl_2 = new import2.AppElement(2,1,this,this._anchor_2);
    this._TemplateRef_2_5 = new import17.TemplateRef_(this._appEl_2,viewFactory_LoadingCmp1);
    this._NgIf_2_6 = new import15.NgIf(this._appEl_2.vcRef,this._TemplateRef_2_5);
    this._anchor_3 = this.renderer.createTemplateAnchor(this._el_1,(null as any));
    this._appEl_3 = new import2.AppElement(3,1,this,this._anchor_3);
    this._TemplateRef_3_5 = new import17.TemplateRef_(this._appEl_3,viewFactory_LoadingCmp2);
    this._NgIf_3_6 = new import15.NgIf(this._appEl_3.vcRef,this._TemplateRef_3_5);
    this._expr_0 = import7.UNINITIALIZED;
    this._expr_1 = import7.UNINITIALIZED;
    this._expr_2 = import7.UNINITIALIZED;
    this.init([],[
      this._el_0,
      this._el_1,
      this._anchor_2,
      this._anchor_3
    ]
    ,[],[]);
    return (null as any);
  }
  injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any {
    if (((token === import14.Backdrop) && (0 === requestNodeIndex))) { return this._Backdrop_0_3; }
    if (((token === import17.TemplateRef) && (2 === requestNodeIndex))) { return this._TemplateRef_2_5; }
    if (((token === import15.NgIf) && (2 === requestNodeIndex))) { return this._NgIf_2_6; }
    if (((token === import17.TemplateRef) && (3 === requestNodeIndex))) { return this._TemplateRef_3_5; }
    if (((token === import15.NgIf) && (3 === requestNodeIndex))) { return this._NgIf_3_6; }
    return notFoundResult;
  }
  detectChangesInternal(throwOnChange:boolean):void {
    if (((this.numberOfChecks === 0) && !throwOnChange)) { this._Backdrop_0_3.ngOnInit(); }
    const currVal_1:any = this.context.showSpinner;
    if (import4.checkBinding(throwOnChange,this._expr_1,currVal_1)) {
      this._NgIf_2_6.ngIf = currVal_1;
      this._expr_1 = currVal_1;
    }
    const currVal_2:any = this.context.d.content;
    if (import4.checkBinding(throwOnChange,this._expr_2,currVal_2)) {
      this._NgIf_3_6.ngIf = currVal_2;
      this._expr_2 = currVal_2;
    }
    this.detectContentChildrenChanges(throwOnChange);
    const currVal_0:boolean = !this.context.d.showBackdrop;
    if (import4.checkBinding(throwOnChange,this._expr_0,currVal_0)) {
      this.renderer.setElementClass(this._el_0,'hide-backdrop',currVal_0);
      this._expr_0 = currVal_0;
    }
    this.detectViewChildrenChanges(throwOnChange);
  }
  destroyInternal():void {
    this._Backdrop_0_3.ngOnDestroy();
  }
}
export function viewFactory_LoadingCmp0(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement):import1.AppView<import3.LoadingCmp> {
  if ((renderType_LoadingCmp === (null as any))) { (renderType_LoadingCmp = viewUtils.createRenderComponentType('/Users/adam/git/ionic2/dist/ionic-angular/components/loading/loading-component.ts class LoadingCmp - inline template',0,import12.ViewEncapsulation.None,styles_LoadingCmp,{})); }
  return new _View_LoadingCmp0(viewUtils,parentInjector,declarationEl);
}
class _View_LoadingCmp1 extends import1.AppView<any> {
  _el_0:any;
  _el_1:any;
  /*private*/ _appEl_1:import2.AppElement;
  _Spinner_1_4:import18.Spinner;
  /*private*/ _expr_0:any;
  /*private*/ _expr_1:any;
  constructor(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement) {
    super(_View_LoadingCmp1,renderType_LoadingCmp,import6.ViewType.EMBEDDED,viewUtils,parentInjector,declarationEl,import7.ChangeDetectorStatus.CheckAlways);
  }
  createInternal(rootSelector:string):import2.AppElement {
    this._el_0 = this.renderer.createElement((null as any),'div',(null as any));
    this.renderer.setElementAttribute(this._el_0,'class','loading-spinner');
    this._el_1 = this.renderer.createElement(this._el_0,'ion-spinner',(null as any));
    this._appEl_1 = new import2.AppElement(1,0,this,this._el_1);
    var compView_1:any = import19.viewFactory_Spinner0(this.viewUtils,this.injector(1),this._appEl_1);
    this._Spinner_1_4 = new import18.Spinner(this.parent.parentInjector.get(import9.Config),new import10.ElementRef(this._el_1),this.renderer);
    this._appEl_1.initComponent(this._Spinner_1_4,[],compView_1);
    compView_1.create(this._Spinner_1_4,[],(null as any));
    this._expr_0 = import7.UNINITIALIZED;
    this._expr_1 = import7.UNINITIALIZED;
    this.init([].concat([this._el_0]),[
      this._el_0,
      this._el_1
    ]
    ,[],[]);
    return (null as any);
  }
  injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any {
    if (((token === import18.Spinner) && (1 === requestNodeIndex))) { return this._Spinner_1_4; }
    return notFoundResult;
  }
  detectChangesInternal(throwOnChange:boolean):void {
    var changed:boolean = true;
    changed = false;
    const currVal_0:any = this.parent.context.d.spinner;
    if (import4.checkBinding(throwOnChange,this._expr_0,currVal_0)) {
      this._Spinner_1_4.name = currVal_0;
      changed = true;
      this._expr_0 = currVal_0;
    }
    if (changed) { this._appEl_1.componentView.markAsCheckOnce(); }
    if (((this.numberOfChecks === 0) && !throwOnChange)) { this._Spinner_1_4.ngOnInit(); }
    this.detectContentChildrenChanges(throwOnChange);
    const currVal_1:any = this._Spinner_1_4.paused;
    if (import4.checkBinding(throwOnChange,this._expr_1,currVal_1)) {
      this.renderer.setElementClass(this._el_1,'spinner-paused',currVal_1);
      this._expr_1 = currVal_1;
    }
    this.detectViewChildrenChanges(throwOnChange);
  }
}
function viewFactory_LoadingCmp1(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement):import1.AppView<any> {
  return new _View_LoadingCmp1(viewUtils,parentInjector,declarationEl);
}
class _View_LoadingCmp2 extends import1.AppView<any> {
  _el_0:any;
  /*private*/ _expr_0:any;
  constructor(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement) {
    super(_View_LoadingCmp2,renderType_LoadingCmp,import6.ViewType.EMBEDDED,viewUtils,parentInjector,declarationEl,import7.ChangeDetectorStatus.CheckAlways);
  }
  createInternal(rootSelector:string):import2.AppElement {
    this._el_0 = this.renderer.createElement((null as any),'div',(null as any));
    this.renderer.setElementAttribute(this._el_0,'class','loading-content');
    this._expr_0 = import7.UNINITIALIZED;
    this.init([].concat([this._el_0]),[this._el_0],[],[]);
    return (null as any);
  }
  detectChangesInternal(throwOnChange:boolean):void {
    this.detectContentChildrenChanges(throwOnChange);
    const currVal_0:any = this.parent.context.d.content;
    if (import4.checkBinding(throwOnChange,this._expr_0,currVal_0)) {
      this.renderer.setElementProperty(this._el_0,'innerHTML',this.viewUtils.sanitizer.sanitize(import20.SecurityContext.HTML,currVal_0));
      this._expr_0 = currVal_0;
    }
    this.detectViewChildrenChanges(throwOnChange);
  }
}
function viewFactory_LoadingCmp2(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement):import1.AppView<any> {
  return new _View_LoadingCmp2(viewUtils,parentInjector,declarationEl);
}