/**
 * 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 './datetime';
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 '../../util/form';
import * as import9 from '../../config/config';
import * as import10 from '@angular/core/src/linker/element_ref';
import * as import11 from '../item/item';
import * as import12 from '../picker/picker';
import * as import13 from '@angular/forms/src/directives/control_value_accessor';
import * as import14 from '@angular/core/src/metadata/view';
import * as import15 from '@angular/core/src/linker/component_factory';
import * as import16 from '../button/button';
import * as import17 from '../button/button.ngfactory';
var renderType_DateTime_Host:import0.RenderComponentType = (null as any);
class _View_DateTime_Host0 extends import1.AppView<any> {
  _el_0:any;
  /*private*/ _appEl_0:import2.AppElement;
  _DateTime_0_4:import3.DateTime;
  __NG_VALUE_ACCESSOR_0_5:any[];
  /*private*/ _expr_2:any;
  constructor(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement) {
    super(_View_DateTime_Host0,renderType_DateTime_Host,import6.ViewType.HOST,viewUtils,parentInjector,declarationEl,import7.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._DateTime_0_4]); }
    return this.__NG_VALUE_ACCESSOR_0_5;
  }
  createInternal(rootSelector:string):import2.AppElement {
    this._el_0 = this.selectOrCreateHostElement('ion-datetime',rootSelector,(null as any));
    this._appEl_0 = new import2.AppElement(0,(null as any),this,this._el_0);
    var compView_0:any = viewFactory_DateTime0(this.viewUtils,this.injector(0),this._appEl_0);
    this._DateTime_0_4 = new import3.DateTime(this.parentInjector.get(import8.Form),this.parentInjector.get(import9.Config),new import10.ElementRef(this._el_0),this.renderer,this.parentInjector.get(import11.Item,(null as any)),this.parentInjector.get(import12.PickerController,(null as any)));
    this._appEl_0.initComponent(this._DateTime_0_4,[],compView_0);
    compView_0.create(this._DateTime_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 = import7.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.DateTime) && (0 === requestNodeIndex))) { return this._DateTime_0_4; }
    if (((token === import13.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.numberOfChecks === 0)) { this._DateTime_0_4.ngAfterContentInit(); } }
    const currVal_2:any = this._DateTime_0_4._disabled;
    if (import4.checkBinding(throwOnChange,this._expr_2,currVal_2)) {
      this.renderer.setElementClass(this._el_0,'datetime-disabled',currVal_2);
      this._expr_2 = currVal_2;
    }
    this.detectViewChildrenChanges(throwOnChange);
  }
  destroyInternal():void {
    this._DateTime_0_4.ngOnDestroy();
  }
  private _handle_click_0_0($event:any):boolean {
    this._appEl_0.componentView.markPathToRootAsCheckOnce();
    const pd_0:any = ((<any>this._DateTime_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._DateTime_0_4._keyup()) !== false);
    return (true && pd_0);
  }
}
function viewFactory_DateTime_Host0(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement):import1.AppView<any> {
  if ((renderType_DateTime_Host === (null as any))) { (renderType_DateTime_Host = viewUtils.createRenderComponentType('',0,import14.ViewEncapsulation.None,[],{})); }
  return new _View_DateTime_Host0(viewUtils,parentInjector,declarationEl);
}
export const DateTimeNgFactory:import15.ComponentFactory<import3.DateTime> = new import15.ComponentFactory<import3.DateTime>('ion-datetime',viewFactory_DateTime_Host0,import3.DateTime);
const styles_DateTime:any[] = [];
var renderType_DateTime:import0.RenderComponentType = (null as any);
class _View_DateTime0 extends import1.AppView<import3.DateTime> {
  _el_0:any;
  _text_1:any;
  _el_2:any;
  /*private*/ _appEl_2:import2.AppElement;
  _Button_2_4:import16.Button;
  /*private*/ _expr_0:any;
  /*private*/ _expr_1:any;
  /*private*/ _expr_2:any;
  /*private*/ _expr_3:any;
  constructor(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement) {
    super(_View_DateTime0,renderType_DateTime,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,'div',(null as any));
    this.renderer.setElementAttribute(this._el_0,'class','datetime-text');
    this._text_1 = this.renderer.createText(this._el_0,'',(null as any));
    this._el_2 = this.renderer.createElement(parentRenderNode,'button',(null as any));
    this.renderer.setElementAttribute(this._el_2,'aria-haspopup','true');
    this.renderer.setElementAttribute(this._el_2,'class','item-cover');
    this.renderer.setElementAttribute(this._el_2,'ion-button','item-cover');
    this.renderer.setElementAttribute(this._el_2,'type','button');
    this._appEl_2 = new import2.AppElement(2,(null as any),this,this._el_2);
    var compView_2:any = import17.viewFactory_Button0(this.viewUtils,this.injector(2),this._appEl_2);
    this._Button_2_4 = new import16.Button((null as any),'item-cover',this.parentInjector.get(import9.Config),new import10.ElementRef(this._el_2),this.renderer);
    this._appEl_2.initComponent(this._Button_2_4,[],compView_2);
    compView_2.create(this._Button_2_4,[[]],(null as any));
    this._expr_0 = import7.UNINITIALIZED;
    this._expr_1 = import7.UNINITIALIZED;
    this._expr_2 = import7.UNINITIALIZED;
    this._expr_3 = import7.UNINITIALIZED;
    this.init([],[
      this._el_0,
      this._text_1,
      this._el_2
    ]
    ,[],[]);
    return (null as any);
  }
  injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any {
    if (((token === import16.Button) && (2 === requestNodeIndex))) { return this._Button_2_4; }
    return notFoundResult;
  }
  detectChangesInternal(throwOnChange:boolean):void {
    this.detectContentChildrenChanges(throwOnChange);
    if (!throwOnChange) { if ((this.numberOfChecks === 0)) { this._Button_2_4.ngAfterContentInit(); } }
    const currVal_0:any = import4.interpolate(1,'',this.context._text,'');
    if (import4.checkBinding(throwOnChange,this._expr_0,currVal_0)) {
      this.renderer.setText(this._text_1,currVal_0);
      this._expr_0 = currVal_0;
    }
    const currVal_1:any = this.context.id;
    if (import4.checkBinding(throwOnChange,this._expr_1,currVal_1)) {
      this.renderer.setElementProperty(this._el_2,'id',currVal_1);
      this._expr_1 = currVal_1;
    }
    const currVal_2:any = this.context._labelId;
    if (import4.checkBinding(throwOnChange,this._expr_2,currVal_2)) {
      this.renderer.setElementAttribute(this._el_2,'aria-labelledby',((currVal_2 == (null as any))? (null as any): currVal_2.toString()));
      this._expr_2 = currVal_2;
    }
    const currVal_3:any = this.context._disabled;
    if (import4.checkBinding(throwOnChange,this._expr_3,currVal_3)) {
      this.renderer.setElementAttribute(this._el_2,'aria-disabled',((currVal_3 == (null as any))? (null as any): currVal_3.toString()));
      this._expr_3 = currVal_3;
    }
    this.detectViewChildrenChanges(throwOnChange);
  }
}
export function viewFactory_DateTime0(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement):import1.AppView<import3.DateTime> {
  if ((renderType_DateTime === (null as any))) { (renderType_DateTime = viewUtils.createRenderComponentType('/Users/dan/Dev/ionic2-build/dist/ionic-angular/components/datetime/datetime.ts class DateTime - inline template',0,import14.ViewEncapsulation.None,styles_DateTime,{})); }
  return new _View_DateTime0(viewUtils,parentInjector,declarationEl);
}