/**
 * 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 './select';
import * as import4 from '@angular/core/src/linker/query_list';
import * as import5 from '@angular/core/src/linker/view_utils';
import * as import6 from '@angular/core/src/di/injector';
import * as import7 from '@angular/core/src/linker/view_type';
import * as import8 from '@angular/core/src/change_detection/change_detection';
import * as import9 from '../app/app';
import * as import10 from '../../util/form';
import * as import11 from '../../config/config';
import * as import12 from '@angular/core/src/linker/element_ref';
import * as import13 from '../item/item';
import * as import14 from '../../navigation/nav-controller';
import * as import15 from '@angular/forms/src/directives/control_value_accessor';
import * as import16 from '@angular/core/src/metadata/view';
import * as import17 from '@angular/core/src/linker/component_factory';
import * as import18 from '@angular/common/src/directives/ng_if';
import * as import19 from '../button/button';
import * as import20 from '@angular/core/src/linker/template_ref';
import * as import21 from '../button/button.ngfactory';
var renderType_Select_Host:import0.RenderComponentType = (null as any);
class _View_Select_Host0 extends import1.AppView<any> {
  _el_0:any;
  /*private*/ _appEl_0:import2.AppElement;
  _Select_0_4:import3.Select;
  __NG_VALUE_ACCESSOR_0_5:any[];
  _query_Option_0_0:import4.QueryList<any>;
  /*private*/ _expr_2:any;
  constructor(viewUtils:import5.ViewUtils,parentInjector:import6.Injector,declarationEl:import2.AppElement) {
    super(_View_Select_Host0,renderType_Select_Host,import7.ViewType.HOST,viewUtils,parentInjector,declarationEl,import8.ChangeDetectorStatus.CheckAlways);
  }
  get _NG_VALUE_ACCESSOR_0_5():any[] {
    if ((this.__NG_VALUE_ACCESSOR_0_5 == (null as any))) { (this.__NG_VALUE_ACCESSOR_0_5 = [this._Select_0_4]); }
    return this.__NG_VALUE_ACCESSOR_0_5;
  }
  createInternal(rootSelector:string):import2.AppElement {
    this._el_0 = this.selectOrCreateHostElement('ion-select',rootSelector,(null as any));
    this._appEl_0 = new import2.AppElement(0,(null as any),this,this._el_0);
    var compView_0:any = viewFactory_Select0(this.viewUtils,this.injector(0),this._appEl_0);
    this._Select_0_4 = new import3.Select(this.parentInjector.get(import9.App),this.parentInjector.get(import10.Form),this.parentInjector.get(import11.Config),new import12.ElementRef(this._el_0),this.renderer,this.parentInjector.get(import13.Item,(null as any)),this.parentInjector.get(import14.NavController,(null as any)));
    this._query_Option_0_0 = new import4.QueryList<any>();
    this._appEl_0.initComponent(this._Select_0_4,[],compView_0);
    compView_0.create(this._Select_0_4,this.projectableNodes,(null as any));
    var disposable_0:Function = this.renderer.listen(this._el_0,'click',this.eventHandler(this._handle_click_0_0.bind(this)));
    var disposable_1:Function = this.renderer.listen(this._el_0,'keyup.space',this.eventHandler(this._handle_keyup_space_0_1.bind(this)));
    this._expr_2 = import8.UNINITIALIZED;
    this.init([].concat([this._el_0]),[this._el_0],[
      disposable_0,
      disposable_1
    ]
    ,[]);
    return this._appEl_0;
  }
  injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any {
    if (((token === import3.Select) && (0 === requestNodeIndex))) { return this._Select_0_4; }
    if (((token === import15.NG_VALUE_ACCESSOR) && (0 === requestNodeIndex))) { return this._NG_VALUE_ACCESSOR_0_5; }
    return notFoundResult;
  }
  detectChangesInternal(throwOnChange:boolean):void {
    this.detectContentChildrenChanges(throwOnChange);
    if (!throwOnChange) {
      if (this._query_Option_0_0.dirty) {
        this._query_Option_0_0.reset([]);
        this._Select_0_4.options = this._query_Option_0_0;
        this._query_Option_0_0.notifyOnChanges();
      }
      if ((this.numberOfChecks === 0)) { this._Select_0_4.ngAfterContentInit(); }
    }
    const currVal_2:any = this._Select_0_4._disabled;
    if (import5.checkBinding(throwOnChange,this._expr_2,currVal_2)) {
      this.renderer.setElementClass(this._el_0,'select-disabled',currVal_2);
      this._expr_2 = currVal_2;
    }
    this.detectViewChildrenChanges(throwOnChange);
  }
  destroyInternal():void {
    this._Select_0_4.ngOnDestroy();
  }
  private _handle_click_0_0($event:any):boolean {
    this._appEl_0.componentView.markPathToRootAsCheckOnce();
    const pd_0:any = ((<any>this._Select_0_4._click($event)) !== false);
    return (true && pd_0);
  }
  private _handle_keyup_space_0_1($event:any):boolean {
    this._appEl_0.componentView.markPathToRootAsCheckOnce();
    const pd_0:any = ((<any>this._Select_0_4._keyup()) !== false);
    return (true && pd_0);
  }
}
function viewFactory_Select_Host0(viewUtils:import5.ViewUtils,parentInjector:import6.Injector,declarationEl:import2.AppElement):import1.AppView<any> {
  if ((renderType_Select_Host === (null as any))) { (renderType_Select_Host = viewUtils.createRenderComponentType('',0,import16.ViewEncapsulation.None,[],{})); }
  return new _View_Select_Host0(viewUtils,parentInjector,declarationEl);
}
export const SelectNgFactory:import17.ComponentFactory<import3.Select> = new import17.ComponentFactory<import3.Select>('ion-select',viewFactory_Select_Host0,import3.Select);
const styles_Select:any[] = [];
var renderType_Select:import0.RenderComponentType = (null as any);
class _View_Select0 extends import1.AppView<import3.Select> {
  _anchor_0:any;
  /*private*/ _appEl_0:import2.AppElement;
  _TemplateRef_0_5:any;
  _NgIf_0_6:import18.NgIf;
  _anchor_1:any;
  /*private*/ _appEl_1:import2.AppElement;
  _TemplateRef_1_5:any;
  _NgIf_1_6:import18.NgIf;
  _el_2:any;
  _el_3:any;
  _el_4:any;
  /*private*/ _appEl_4:import2.AppElement;
  _Button_4_4:import19.Button;
  /*private*/ _expr_0:any;
  /*private*/ _expr_1:any;
  /*private*/ _expr_2:any;
  /*private*/ _expr_3:any;
  /*private*/ _expr_4:any;
  constructor(viewUtils:import5.ViewUtils,parentInjector:import6.Injector,declarationEl:import2.AppElement) {
    super(_View_Select0,renderType_Select,import7.ViewType.COMPONENT,viewUtils,parentInjector,declarationEl,import8.ChangeDetectorStatus.CheckAlways);
  }
  createInternal(rootSelector:string):import2.AppElement {
    const parentRenderNode:any = this.renderer.createViewRoot(this.declarationAppElement.nativeElement);
    this._anchor_0 = this.renderer.createTemplateAnchor(parentRenderNode,(null as any));
    this._appEl_0 = new import2.AppElement(0,(null as any),this,this._anchor_0);
    this._TemplateRef_0_5 = new import20.TemplateRef_(this._appEl_0,viewFactory_Select1);
    this._NgIf_0_6 = new import18.NgIf(this._appEl_0.vcRef,this._TemplateRef_0_5);
    this._anchor_1 = this.renderer.createTemplateAnchor(parentRenderNode,(null as any));
    this._appEl_1 = new import2.AppElement(1,(null as any),this,this._anchor_1);
    this._TemplateRef_1_5 = new import20.TemplateRef_(this._appEl_1,viewFactory_Select2);
    this._NgIf_1_6 = new import18.NgIf(this._appEl_1.vcRef,this._TemplateRef_1_5);
    this._el_2 = this.renderer.createElement(parentRenderNode,'div',(null as any));
    this.renderer.setElementAttribute(this._el_2,'class','select-icon');
    this._el_3 = this.renderer.createElement(this._el_2,'div',(null as any));
    this.renderer.setElementAttribute(this._el_3,'class','select-icon-inner');
    this._el_4 = this.renderer.createElement(parentRenderNode,'button',(null as any));
    this.renderer.setElementAttribute(this._el_4,'aria-haspopup','true');
    this.renderer.setElementAttribute(this._el_4,'class','item-cover');
    this.renderer.setElementAttribute(this._el_4,'ion-button','item-cover');
    this._appEl_4 = new import2.AppElement(4,(null as any),this,this._el_4);
    var compView_4:any = import21.viewFactory_Button0(this.viewUtils,this.injector(4),this._appEl_4);
    this._Button_4_4 = new import19.Button((null as any),'item-cover',this.parentInjector.get(import11.Config),new import12.ElementRef(this._el_4),this.renderer);
    this._appEl_4.initComponent(this._Button_4_4,[],compView_4);
    compView_4.create(this._Button_4_4,[[]],(null as any));
    this._expr_0 = import8.UNINITIALIZED;
    this._expr_1 = import8.UNINITIALIZED;
    this._expr_2 = import8.UNINITIALIZED;
    this._expr_3 = import8.UNINITIALIZED;
    this._expr_4 = import8.UNINITIALIZED;
    this.init([],[
      this._anchor_0,
      this._anchor_1,
      this._el_2,
      this._el_3,
      this._el_4
    ]
    ,[],[]);
    return (null as any);
  }
  injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any {
    if (((token === import20.TemplateRef) && (0 === requestNodeIndex))) { return this._TemplateRef_0_5; }
    if (((token === import18.NgIf) && (0 === requestNodeIndex))) { return this._NgIf_0_6; }
    if (((token === import20.TemplateRef) && (1 === requestNodeIndex))) { return this._TemplateRef_1_5; }
    if (((token === import18.NgIf) && (1 === requestNodeIndex))) { return this._NgIf_1_6; }
    if (((token === import19.Button) && (4 === requestNodeIndex))) { return this._Button_4_4; }
    return notFoundResult;
  }
  detectChangesInternal(throwOnChange:boolean):void {
    const currVal_0:boolean = !this.context._text;
    if (import5.checkBinding(throwOnChange,this._expr_0,currVal_0)) {
      this._NgIf_0_6.ngIf = currVal_0;
      this._expr_0 = currVal_0;
    }
    const currVal_1:any = this.context._text;
    if (import5.checkBinding(throwOnChange,this._expr_1,currVal_1)) {
      this._NgIf_1_6.ngIf = currVal_1;
      this._expr_1 = currVal_1;
    }
    this.detectContentChildrenChanges(throwOnChange);
    if (!throwOnChange) { if ((this.numberOfChecks === 0)) { this._Button_4_4.ngAfterContentInit(); } }
    const currVal_2:any = this.context.id;
    if (import5.checkBinding(throwOnChange,this._expr_2,currVal_2)) {
      this.renderer.setElementProperty(this._el_4,'id',currVal_2);
      this._expr_2 = currVal_2;
    }
    const currVal_3:any = this.context._labelId;
    if (import5.checkBinding(throwOnChange,this._expr_3,currVal_3)) {
      this.renderer.setElementAttribute(this._el_4,'aria-labelledby',((currVal_3 == (null as any))? (null as any): currVal_3.toString()));
      this._expr_3 = currVal_3;
    }
    const currVal_4:any = this.context._disabled;
    if (import5.checkBinding(throwOnChange,this._expr_4,currVal_4)) {
      this.renderer.setElementAttribute(this._el_4,'aria-disabled',((currVal_4 == (null as any))? (null as any): currVal_4.toString()));
      this._expr_4 = currVal_4;
    }
    this.detectViewChildrenChanges(throwOnChange);
  }
}
export function viewFactory_Select0(viewUtils:import5.ViewUtils,parentInjector:import6.Injector,declarationEl:import2.AppElement):import1.AppView<import3.Select> {
  if ((renderType_Select === (null as any))) { (renderType_Select = viewUtils.createRenderComponentType('/Users/dan/Dev/ionic2-build/dist/ionic-angular/components/select/select.ts class Select - inline template',0,import16.ViewEncapsulation.None,styles_Select,{})); }
  return new _View_Select0(viewUtils,parentInjector,declarationEl);
}
class _View_Select1 extends import1.AppView<any> {
  _el_0:any;
  _text_1:any;
  /*private*/ _expr_0:any;
  constructor(viewUtils:import5.ViewUtils,parentInjector:import6.Injector,declarationEl:import2.AppElement) {
    super(_View_Select1,renderType_Select,import7.ViewType.EMBEDDED,viewUtils,parentInjector,declarationEl,import8.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','select-placeholder select-text');
    this._text_1 = this.renderer.createText(this._el_0,'',(null as any));
    this._expr_0 = import8.UNINITIALIZED;
    this.init([].concat([this._el_0]),[
      this._el_0,
      this._text_1
    ]
    ,[],[]);
    return (null as any);
  }
  detectChangesInternal(throwOnChange:boolean):void {
    this.detectContentChildrenChanges(throwOnChange);
    const currVal_0:any = import5.interpolate(1,'',this.parent.context.placeholder,'');
    if (import5.checkBinding(throwOnChange,this._expr_0,currVal_0)) {
      this.renderer.setText(this._text_1,currVal_0);
      this._expr_0 = currVal_0;
    }
    this.detectViewChildrenChanges(throwOnChange);
  }
}
function viewFactory_Select1(viewUtils:import5.ViewUtils,parentInjector:import6.Injector,declarationEl:import2.AppElement):import1.AppView<any> {
  return new _View_Select1(viewUtils,parentInjector,declarationEl);
}
class _View_Select2 extends import1.AppView<any> {
  _el_0:any;
  _text_1:any;
  /*private*/ _expr_0:any;
  constructor(viewUtils:import5.ViewUtils,parentInjector:import6.Injector,declarationEl:import2.AppElement) {
    super(_View_Select2,renderType_Select,import7.ViewType.EMBEDDED,viewUtils,parentInjector,declarationEl,import8.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','select-text');
    this._text_1 = this.renderer.createText(this._el_0,'',(null as any));
    this._expr_0 = import8.UNINITIALIZED;
    this.init([].concat([this._el_0]),[
      this._el_0,
      this._text_1
    ]
    ,[],[]);
    return (null as any);
  }
  detectChangesInternal(throwOnChange:boolean):void {
    this.detectContentChildrenChanges(throwOnChange);
    const currVal_0:any = import5.interpolate(1,'',(this.parent.context.selectedText || this.parent.context._text),'');
    if (import5.checkBinding(throwOnChange,this._expr_0,currVal_0)) {
      this.renderer.setText(this._text_1,currVal_0);
      this._expr_0 = currVal_0;
    }
    this.detectViewChildrenChanges(throwOnChange);
  }
}
function viewFactory_Select2(viewUtils:import5.ViewUtils,parentInjector:import6.Injector,declarationEl:import2.AppElement):import1.AppView<any> {
  return new _View_Select2(viewUtils,parentInjector,declarationEl);
}