/**
 * 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 './segment';
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/element_ref';
import * as import9 from '@angular/core/src/metadata/view';
import * as import10 from '@angular/core/src/linker/component_factory';
var renderType_SegmentButton_Host:import0.RenderComponentType = (null as any);
class _View_SegmentButton_Host0 extends import1.AppView<any> {
  _el_0:any;
  /*private*/ _appEl_0:import2.AppElement;
  _SegmentButton_0_4:import3.SegmentButton;
  constructor(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement) {
    super(_View_SegmentButton_Host0,renderType_SegmentButton_Host,import6.ViewType.HOST,viewUtils,parentInjector,declarationEl,import7.ChangeDetectorStatus.CheckAlways);
  }
  createInternal(rootSelector:string):import2.AppElement {
    this._el_0 = this.selectOrCreateHostElement('ion-segment-button',rootSelector,(null as any));
    this.renderer.setElementAttribute(this._el_0,'class','segment-button');
    this.renderer.setElementAttribute(this._el_0,'role','button');
    this.renderer.setElementAttribute(this._el_0,'tappable','');
    this._appEl_0 = new import2.AppElement(0,(null as any),this,this._el_0);
    var compView_0:any = viewFactory_SegmentButton0(this.viewUtils,this.injector(0),this._appEl_0);
    this._SegmentButton_0_4 = new import3.SegmentButton(this.renderer,new import8.ElementRef(this._el_0));
    this._appEl_0.initComponent(this._SegmentButton_0_4,[],compView_0);
    compView_0.create(this._SegmentButton_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)));
    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.SegmentButton) && (0 === requestNodeIndex))) { return this._SegmentButton_0_4; }
    return notFoundResult;
  }
  detectChangesInternal(throwOnChange:boolean):void {
    if (((this.numberOfChecks === 0) && !throwOnChange)) { this._SegmentButton_0_4.ngOnInit(); }
    this.detectContentChildrenChanges(throwOnChange);
    this.detectViewChildrenChanges(throwOnChange);
  }
  private _handle_click_0_0($event:any):boolean {
    this._appEl_0.componentView.markPathToRootAsCheckOnce();
    const pd_0:any = ((<any>this._SegmentButton_0_4.onClick()) !== false);
    return (true && pd_0);
  }
}
function viewFactory_SegmentButton_Host0(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement):import1.AppView<any> {
  if ((renderType_SegmentButton_Host === (null as any))) { (renderType_SegmentButton_Host = viewUtils.createRenderComponentType('',0,import9.ViewEncapsulation.None,[],{})); }
  return new _View_SegmentButton_Host0(viewUtils,parentInjector,declarationEl);
}
export const SegmentButtonNgFactory:import10.ComponentFactory<import3.SegmentButton> = new import10.ComponentFactory<import3.SegmentButton>('ion-segment-button',viewFactory_SegmentButton_Host0,import3.SegmentButton);
const styles_SegmentButton:any[] = [];
var renderType_SegmentButton:import0.RenderComponentType = (null as any);
class _View_SegmentButton0 extends import1.AppView<import3.SegmentButton> {
  _el_0:any;
  constructor(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement) {
    super(_View_SegmentButton0,renderType_SegmentButton,import6.ViewType.COMPONENT,viewUtils,parentInjector,declarationEl,import7.ChangeDetectorStatus.CheckAlways);
  }
  createInternal(rootSelector:string):import2.AppElement {
    const parentRenderNode:any = this.renderer.createViewRoot(this.declarationAppElement.nativeElement);
    this.renderer.projectNodes(parentRenderNode,import4.flattenNestedViewRenderNodes(this.projectableNodes[0]));
    this._el_0 = this.renderer.createElement(parentRenderNode,'div',(null as any));
    this.renderer.setElementAttribute(this._el_0,'class','button-effect');
    this.init([],[this._el_0],[],[]);
    return (null as any);
  }
}
export function viewFactory_SegmentButton0(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement):import1.AppView<import3.SegmentButton> {
  if ((renderType_SegmentButton === (null as any))) { (renderType_SegmentButton = viewUtils.createRenderComponentType('/Users/adam/git/ionic2/dist/ionic-angular/components/segment/segment.ts class SegmentButton - inline template',1,import9.ViewEncapsulation.None,styles_SegmentButton,{})); }
  return new _View_SegmentButton0(viewUtils,parentInjector,declarationEl);
}