/**
 * 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 './item';
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 '../../util/form';
import * as import10 from '../../config/config';
import * as import11 from '@angular/core/src/linker/element_ref';
import * as import12 from '@angular/core/src/metadata/view';
import * as import13 from '@angular/core/src/linker/component_factory';
import * as import14 from '@angular/common/src/directives/ng_if';
import * as import15 from './item-reorder';
import * as import16 from '@angular/core/src/linker/template_ref';
import * as import17 from './item-reorder.ngfactory';
import * as import18 from '../label/label';
var renderType_Item_Host:import0.RenderComponentType = (null as any);
class _View_Item_Host0 extends import1.AppView<any> {
  _el_0:any;
  /*private*/ _appEl_0:import2.AppElement;
  _Item_0_4:import3.Item;
  _query_Label_0_0:import4.QueryList<any>;
  _query_Button_0_1:import4.QueryList<any>;
  _query_Icon_0_2:import4.QueryList<any>;
  constructor(viewUtils:import5.ViewUtils,parentInjector:import6.Injector,declarationEl:import2.AppElement) {
    super(_View_Item_Host0,renderType_Item_Host,import7.ViewType.HOST,viewUtils,parentInjector,declarationEl,import8.ChangeDetectorStatus.CheckAlways);
  }
  createInternal(rootSelector:string):import2.AppElement {
    this._el_0 = this.selectOrCreateHostElement('ion-list-header',rootSelector,(null as any));
    this.renderer.setElementAttribute(this._el_0,'class','item');
    this._appEl_0 = new import2.AppElement(0,(null as any),this,this._el_0);
    var compView_0:any = viewFactory_Item0(this.viewUtils,this.injector(0),this._appEl_0);
    this._Item_0_4 = new import3.Item(this.parentInjector.get(import9.Form),this.parentInjector.get(import10.Config),new import11.ElementRef(this._el_0),this.renderer);
    this._query_Label_0_0 = new import4.QueryList<any>();
    this._query_Button_0_1 = new import4.QueryList<any>();
    this._query_Icon_0_2 = new import4.QueryList<any>();
    this._appEl_0.initComponent(this._Item_0_4,[],compView_0);
    this._query_Label_0_0.reset([]);
    this._Item_0_4.contentLabel = this._query_Label_0_0.first;
    compView_0.create(this._Item_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.Item) && (0 === requestNodeIndex))) { return this._Item_0_4; }
    return notFoundResult;
  }
  detectChangesInternal(throwOnChange:boolean):void {
    this.detectContentChildrenChanges(throwOnChange);
    if (!throwOnChange) {
      if (this._query_Button_0_1.dirty) {
        this._query_Button_0_1.reset([]);
        this._Item_0_4._buttons = this._query_Button_0_1;
        this._query_Button_0_1.notifyOnChanges();
      }
      if (this._query_Icon_0_2.dirty) {
        this._query_Icon_0_2.reset([]);
        this._Item_0_4._icons = this._query_Icon_0_2;
        this._query_Icon_0_2.notifyOnChanges();
      }
      if ((this.numberOfChecks === 0)) { this._Item_0_4.ngAfterContentInit(); }
    }
    this.detectViewChildrenChanges(throwOnChange);
  }
}
function viewFactory_Item_Host0(viewUtils:import5.ViewUtils,parentInjector:import6.Injector,declarationEl:import2.AppElement):import1.AppView<any> {
  if ((renderType_Item_Host === (null as any))) { (renderType_Item_Host = viewUtils.createRenderComponentType('',0,import12.ViewEncapsulation.None,[],{})); }
  return new _View_Item_Host0(viewUtils,parentInjector,declarationEl);
}
export const ItemNgFactory:import13.ComponentFactory<import3.Item> = new import13.ComponentFactory<import3.Item>('ion-list-header,ion-item,[ion-item],ion-item-divider',viewFactory_Item_Host0,import3.Item);
const styles_Item:any[] = [];
var renderType_Item:import0.RenderComponentType = (null as any);
class _View_Item0 extends import1.AppView<import3.Item> {
  _viewQuery_Label_0:import4.QueryList<any>;
  _el_0:any;
  _el_1:any;
  _anchor_2:any;
  /*private*/ _appEl_2:import2.AppElement;
  _TemplateRef_2_5:any;
  _NgIf_2_6:import14.NgIf;
  _el_3:any;
  /*private*/ _appEl_3:import2.AppElement;
  _Reorder_3_4:import15.Reorder;
  _el_4:any;
  /*private*/ _expr_0:any;
  constructor(viewUtils:import5.ViewUtils,parentInjector:import6.Injector,declarationEl:import2.AppElement) {
    super(_View_Item0,renderType_Item,import7.ViewType.COMPONENT,viewUtils,parentInjector,declarationEl,import8.ChangeDetectorStatus.CheckOnce);
  }
  createInternal(rootSelector:string):import2.AppElement {
    const parentRenderNode:any = this.renderer.createViewRoot(this.declarationAppElement.nativeElement);
    this._viewQuery_Label_0 = new import4.QueryList<any>();
    this.renderer.projectNodes(parentRenderNode,import5.flattenNestedViewRenderNodes(this.projectableNodes[0]));
    this._el_0 = this.renderer.createElement(parentRenderNode,'div',(null as any));
    this.renderer.setElementAttribute(this._el_0,'class','item-inner');
    this._el_1 = this.renderer.createElement(this._el_0,'div',(null as any));
    this.renderer.setElementAttribute(this._el_1,'class','input-wrapper');
    this.renderer.projectNodes(this._el_1,import5.flattenNestedViewRenderNodes(this.projectableNodes[1]));
    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 import16.TemplateRef_(this._appEl_2,viewFactory_Item1);
    this._NgIf_2_6 = new import14.NgIf(this._appEl_2.vcRef,this._TemplateRef_2_5);
    this.renderer.projectNodes(this._el_1,import5.flattenNestedViewRenderNodes(this.projectableNodes[3]));
    this.renderer.projectNodes(this._el_0,import5.flattenNestedViewRenderNodes(this.projectableNodes[4]));
    this._el_3 = this.renderer.createElement(this._el_0,'ion-reorder',(null as any));
    this._appEl_3 = new import2.AppElement(3,0,this,this._el_3);
    var compView_3:any = import17.viewFactory_Reorder0(this.viewUtils,this.injector(3),this._appEl_3);
    this._Reorder_3_4 = new import15.Reorder(this.parentInjector.get(import3.Item),new import11.ElementRef(this._el_3));
    this._appEl_3.initComponent(this._Reorder_3_4,[],compView_3);
    compView_3.create(this._Reorder_3_4,[],(null as any));
    this._el_4 = this.renderer.createElement(parentRenderNode,'div',(null as any));
    this.renderer.setElementAttribute(this._el_4,'class','button-effect');
    this._expr_0 = import8.UNINITIALIZED;
    this.init([],[
      this._el_0,
      this._el_1,
      this._anchor_2,
      this._el_3,
      this._el_4
    ]
    ,[],[]);
    return (null as any);
  }
  injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any {
    if (((token === import16.TemplateRef) && (2 === requestNodeIndex))) { return this._TemplateRef_2_5; }
    if (((token === import14.NgIf) && (2 === requestNodeIndex))) { return this._NgIf_2_6; }
    if (((token === import15.Reorder) && (3 === requestNodeIndex))) { return this._Reorder_3_4; }
    return notFoundResult;
  }
  detectChangesInternal(throwOnChange:boolean):void {
    const currVal_0:any = this.context._viewLabel;
    if (import5.checkBinding(throwOnChange,this._expr_0,currVal_0)) {
      this._NgIf_2_6.ngIf = currVal_0;
      this._expr_0 = currVal_0;
    }
    this.detectContentChildrenChanges(throwOnChange);
    this.detectViewChildrenChanges(throwOnChange);
    if (!throwOnChange) { if (this._viewQuery_Label_0.dirty) {
        this._viewQuery_Label_0.reset([this._appEl_2.mapNestedViews(_View_Item1,(nestedView:_View_Item1):any => {
          return [nestedView._Label_0_3];
      })]);
      this.context.viewLabel = this._viewQuery_Label_0.first;
    } }
  }
}
export function viewFactory_Item0(viewUtils:import5.ViewUtils,parentInjector:import6.Injector,declarationEl:import2.AppElement):import1.AppView<import3.Item> {
  if ((renderType_Item === (null as any))) { (renderType_Item = viewUtils.createRenderComponentType('/Users/adam/git/ionic2/dist/ionic-angular/esm/components/item/item.ts class Item - inline template',5,import12.ViewEncapsulation.None,styles_Item,{})); }
  return new _View_Item0(viewUtils,parentInjector,declarationEl);
}
class _View_Item1 extends import1.AppView<any> {
  _el_0:any;
  _Label_0_3:import18.Label;
  constructor(viewUtils:import5.ViewUtils,parentInjector:import6.Injector,declarationEl:import2.AppElement) {
    super(_View_Item1,renderType_Item,import7.ViewType.EMBEDDED,viewUtils,parentInjector,declarationEl,import8.ChangeDetectorStatus.CheckAlways);
  }
  createInternal(rootSelector:string):import2.AppElement {
    this._el_0 = this.renderer.createElement((null as any),'ion-label',(null as any));
    this._Label_0_3 = new import18.Label(this.parent.parentInjector.get(import10.Config),new import11.ElementRef(this._el_0),this.renderer,(null as any),(null as any),(null as any),(null as any));
    this.renderer.projectNodes(this._el_0,import5.flattenNestedViewRenderNodes(this.projectableNodes[2]));
    this.init([].concat([this._el_0]),[this._el_0],[],[]);
    return (null as any);
  }
  injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any {
    if (((token === import18.Label) && (0 === requestNodeIndex))) { return this._Label_0_3; }
    return notFoundResult;
  }
  dirtyParentQueriesInternal():void {
    (<_View_Item0>this.parent)._viewQuery_Label_0.setDirty();
  }
}
function viewFactory_Item1(viewUtils:import5.ViewUtils,parentInjector:import6.Injector,declarationEl:import2.AppElement):import1.AppView<any> {
  return new _View_Item1(viewUtils,parentInjector,declarationEl);
}