/**
 * 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 './menu';
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 './menu-controller';
import * as import9 from '@angular/core/src/linker/element_ref';
import * as import10 from '../../config/config';
import * as import11 from '../../platform/platform';
import * as import12 from '../../util/keyboard';
import * as import13 from '@angular/core/src/zone/ng_zone';
import * as import14 from '../../gestures/gesture-controller';
import * as import15 from '@angular/core/src/metadata/view';
import * as import16 from '@angular/core/src/linker/component_factory';
import * as import17 from '@angular/core/src/linker/query_list';
import * as import18 from '../backdrop/backdrop';
var renderType_Menu_Host:import0.RenderComponentType = (null as any);
class _View_Menu_Host0 extends import1.AppView<any> {
  _el_0:any;
  /*private*/ _appEl_0:import2.AppElement;
  _Menu_0_4:import3.Menu;
  constructor(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement) {
    super(_View_Menu_Host0,renderType_Menu_Host,import6.ViewType.HOST,viewUtils,parentInjector,declarationEl,import7.ChangeDetectorStatus.CheckAlways);
  }
  createInternal(rootSelector:string):import2.AppElement {
    this._el_0 = this.selectOrCreateHostElement('ion-menu',rootSelector,(null as any));
    this.renderer.setElementAttribute(this._el_0,'role','navigation');
    this._appEl_0 = new import2.AppElement(0,(null as any),this,this._el_0);
    var compView_0:any = viewFactory_Menu0(this.viewUtils,this.injector(0),this._appEl_0);
    this._Menu_0_4 = new import3.Menu(this.parentInjector.get(import8.MenuController),new import9.ElementRef(this._el_0),this.parentInjector.get(import10.Config),this.parentInjector.get(import11.Platform),this.renderer,this.parentInjector.get(import12.Keyboard),this.parentInjector.get(import13.NgZone),this.parentInjector.get(import14.GestureController));
    this._appEl_0.initComponent(this._Menu_0_4,[],compView_0);
    compView_0.create(this._Menu_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.Menu) && (0 === requestNodeIndex))) { return this._Menu_0_4; }
    return notFoundResult;
  }
  detectChangesInternal(throwOnChange:boolean):void {
    if (((this.numberOfChecks === 0) && !throwOnChange)) { this._Menu_0_4.ngOnInit(); }
    this.detectContentChildrenChanges(throwOnChange);
    this.detectViewChildrenChanges(throwOnChange);
  }
  destroyInternal():void {
    this._Menu_0_4.ngOnDestroy();
  }
}
function viewFactory_Menu_Host0(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement):import1.AppView<any> {
  if ((renderType_Menu_Host === (null as any))) { (renderType_Menu_Host = viewUtils.createRenderComponentType('',0,import15.ViewEncapsulation.None,[],{})); }
  return new _View_Menu_Host0(viewUtils,parentInjector,declarationEl);
}
export const MenuNgFactory:import16.ComponentFactory<import3.Menu> = new import16.ComponentFactory<import3.Menu>('ion-menu',viewFactory_Menu_Host0,import3.Menu);
const styles_Menu:any[] = [];
var renderType_Menu:import0.RenderComponentType = (null as any);
class _View_Menu0 extends import1.AppView<import3.Menu> {
  _viewQuery_Backdrop_0:import17.QueryList<any>;
  _el_0:any;
  _el_1:any;
  _Backdrop_1_3:import18.Backdrop;
  /*private*/ _expr_1:any;
  constructor(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement) {
    super(_View_Menu0,renderType_Menu,import6.ViewType.COMPONENT,viewUtils,parentInjector,declarationEl,import7.ChangeDetectorStatus.CheckOnce);
  }
  createInternal(rootSelector:string):import2.AppElement {
    const parentRenderNode:any = this.renderer.createViewRoot(this.declarationAppElement.nativeElement);
    this._viewQuery_Backdrop_0 = new import17.QueryList<any>();
    this._el_0 = this.renderer.createElement(parentRenderNode,'div',(null as any));
    this.renderer.setElementAttribute(this._el_0,'class','menu-inner');
    this.renderer.projectNodes(this._el_0,import4.flattenNestedViewRenderNodes(this.projectableNodes[0]));
    this._el_1 = this.renderer.createElement(parentRenderNode,'ion-backdrop',(null as any));
    this.renderer.setElementAttribute(this._el_1,'disable-activated','');
    this.renderer.setElementAttribute(this._el_1,'disableScroll','false');
    this.renderer.setElementAttribute(this._el_1,'role','presentation');
    this.renderer.setElementAttribute(this._el_1,'tappable','');
    this._Backdrop_1_3 = new import18.Backdrop(this.parentInjector.get(import14.GestureController),new import9.ElementRef(this._el_1));
    var disposable_0:Function = this.renderer.listen(this._el_1,'click',this.eventHandler(this._handle_click_1_0.bind(this)));
    this._expr_1 = import7.UNINITIALIZED;
    this._viewQuery_Backdrop_0.reset([this._Backdrop_1_3]);
    this.context.backdrop = this._viewQuery_Backdrop_0.first;
    this.init([],[
      this._el_0,
      this._el_1
    ]
    ,[disposable_0],[]);
    return (null as any);
  }
  injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any {
    if (((token === import18.Backdrop) && (1 === requestNodeIndex))) { return this._Backdrop_1_3; }
    return notFoundResult;
  }
  detectChangesInternal(throwOnChange:boolean):void {
    const currVal_1:any = 'false';
    if (import4.checkBinding(throwOnChange,this._expr_1,currVal_1)) {
      this._Backdrop_1_3.disableScroll = currVal_1;
      this._expr_1 = currVal_1;
    }
    if (((this.numberOfChecks === 0) && !throwOnChange)) { this._Backdrop_1_3.ngOnInit(); }
    this.detectContentChildrenChanges(throwOnChange);
    this.detectViewChildrenChanges(throwOnChange);
  }
  destroyInternal():void {
    this._Backdrop_1_3.ngOnDestroy();
  }
  private _handle_click_1_0($event:any):boolean {
    this.markPathToRootAsCheckOnce();
    const pd_0:any = ((<any>this.context.bdClick($event)) !== false);
    return (true && pd_0);
  }
}
export function viewFactory_Menu0(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement):import1.AppView<import3.Menu> {
  if ((renderType_Menu === (null as any))) { (renderType_Menu = viewUtils.createRenderComponentType('/Users/adam/git/ionic2/dist/ionic-angular/components/menu/menu.ts class Menu - inline template',1,import15.ViewEncapsulation.None,styles_Menu,{})); }
  return new _View_Menu0(viewUtils,parentInjector,declarationEl);
}