/**
 * 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 './popover-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 '@angular/core/src/linker/element_ref';
import * as import10 from '../../config/config';
import * as import11 from '../../navigation/nav-params';
import * as import12 from '../../navigation/view-controller';
import * as import13 from '@angular/core/src/metadata/view';
import * as import14 from '@angular/core/src/linker/component_factory';
import * as import15 from '@angular/core/src/linker/query_list';
import * as import16 from '../backdrop/backdrop';
import * as import17 from '../../gestures/gesture-controller';
var renderType_PopoverCmp_Host:import0.RenderComponentType = (null as any);
class _View_PopoverCmp_Host0 extends import1.AppView<any> {
  _el_0:any;
  /*private*/ _appEl_0:import2.AppElement;
  _PopoverCmp_0_4:import3.PopoverCmp;
  constructor(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement) {
    super(_View_PopoverCmp_Host0,renderType_PopoverCmp_Host,import6.ViewType.HOST,viewUtils,parentInjector,declarationEl,import7.ChangeDetectorStatus.CheckAlways);
  }
  createInternal(rootSelector:string):import2.AppElement {
    this._el_0 = this.selectOrCreateHostElement('ion-popover',rootSelector,(null as any));
    this._appEl_0 = new import2.AppElement(0,(null as any),this,this._el_0);
    var compView_0:any = viewFactory_PopoverCmp0(this.viewUtils,this.injector(0),this._appEl_0);
    this._PopoverCmp_0_4 = new import3.PopoverCmp(this.parentInjector.get(import8.ComponentFactoryResolver),new import9.ElementRef(this._el_0),this.renderer,this.parentInjector.get(import10.Config),this.parentInjector.get(import11.NavParams),this.parentInjector.get(import12.ViewController));
    this._appEl_0.initComponent(this._PopoverCmp_0_4,[],compView_0);
    compView_0.create(this._PopoverCmp_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.PopoverCmp) && (0 === requestNodeIndex))) { return this._PopoverCmp_0_4; }
    return notFoundResult;
  }
  detectChangesInternal(throwOnChange:boolean):void {
    this.detectContentChildrenChanges(throwOnChange);
    this.detectViewChildrenChanges(throwOnChange);
    if (!throwOnChange) { if ((this.numberOfChecks === 0)) { this._PopoverCmp_0_4.ngAfterViewInit(); } }
  }
  private _handle_keyup_0_0($event:any):boolean {
    this._appEl_0.componentView.markPathToRootAsCheckOnce();
    const pd_0:any = ((<any>this._PopoverCmp_0_4._keyUp($event)) !== false);
    return (true && pd_0);
  }
}
function viewFactory_PopoverCmp_Host0(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement):import1.AppView<any> {
  if ((renderType_PopoverCmp_Host === (null as any))) { (renderType_PopoverCmp_Host = viewUtils.createRenderComponentType('',0,import13.ViewEncapsulation.None,[],{})); }
  return new _View_PopoverCmp_Host0(viewUtils,parentInjector,declarationEl);
}
export const PopoverCmpNgFactory:import14.ComponentFactory<import3.PopoverCmp> = new import14.ComponentFactory<import3.PopoverCmp>('ion-popover',viewFactory_PopoverCmp_Host0,import3.PopoverCmp);
const styles_PopoverCmp:any[] = [];
var renderType_PopoverCmp:import0.RenderComponentType = (null as any);
class _View_PopoverCmp0 extends import1.AppView<import3.PopoverCmp> {
  _viewQuery_viewport_0:import15.QueryList<any>;
  _el_0:any;
  _Backdrop_0_3:import16.Backdrop;
  _el_1:any;
  _el_2:any;
  _el_3:any;
  _el_4:any;
  _el_5:any;
  /*private*/ _appEl_5:import2.AppElement;
  /*private*/ _expr_1:any;
  constructor(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement) {
    super(_View_PopoverCmp0,renderType_PopoverCmp,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 import15.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,'role','presentation');
    this.renderer.setElementAttribute(this._el_0,'tappable','');
    this._Backdrop_0_3 = new import16.Backdrop(this.parentInjector.get(import17.GestureController),new import9.ElementRef(this._el_0));
    this._el_1 = this.renderer.createElement(parentRenderNode,'div',(null as any));
    this.renderer.setElementAttribute(this._el_1,'class','popover-wrapper');
    this._el_2 = this.renderer.createElement(this._el_1,'div',(null as any));
    this.renderer.setElementAttribute(this._el_2,'class','popover-arrow');
    this._el_3 = this.renderer.createElement(this._el_1,'div',(null as any));
    this.renderer.setElementAttribute(this._el_3,'class','popover-content');
    this._el_4 = this.renderer.createElement(this._el_3,'div',(null as any));
    this.renderer.setElementAttribute(this._el_4,'class','popover-viewport');
    this._el_5 = this.renderer.createElement(this._el_4,'div',(null as any));
    this.renderer.setElementAttribute(this._el_5,'nav-viewport','');
    this._appEl_5 = new import2.AppElement(5,4,this,this._el_5);
    this._expr_1 = import7.UNINITIALIZED;
    var disposable_0:Function = this.renderer.listen(this._el_0,'click',this.eventHandler(this._handle_click_0_0.bind(this)));
    this._viewQuery_viewport_0.reset([this._appEl_5.vcRef]);
    this.context._viewport = this._viewQuery_viewport_0.first;
    this.init([],[
      this._el_0,
      this._el_1,
      this._el_2,
      this._el_3,
      this._el_4,
      this._el_5
    ]
    ,[disposable_0],[]);
    return (null as any);
  }
  injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any {
    if (((token === import16.Backdrop) && (0 === requestNodeIndex))) { return this._Backdrop_0_3; }
    return notFoundResult;
  }
  detectChangesInternal(throwOnChange:boolean):void {
    if (((this.numberOfChecks === 0) && !throwOnChange)) { this._Backdrop_0_3.ngOnInit(); }
    this.detectContentChildrenChanges(throwOnChange);
    const currVal_1:boolean = !this.context.d.showBackdrop;
    if (import4.checkBinding(throwOnChange,this._expr_1,currVal_1)) {
      this.renderer.setElementClass(this._el_0,'hide-backdrop',currVal_1);
      this._expr_1 = currVal_1;
    }
    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_PopoverCmp0(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement):import1.AppView<import3.PopoverCmp> {
  if ((renderType_PopoverCmp === (null as any))) { (renderType_PopoverCmp = viewUtils.createRenderComponentType('/Users/adam/git/ionic2/dist/ionic-angular/components/popover/popover-component.ts class PopoverCmp - inline template',0,import13.ViewEncapsulation.None,styles_PopoverCmp,{})); }
  return new _View_PopoverCmp0(viewUtils,parentInjector,declarationEl);
}