library examples.hello_world.index_common_dart.ng_deps.dart;

import 'dependency.dart';
import 'dependency.ng_deps.dart' as i0;
import 'hello.dart';
import 'package:angular2/angular2.dart'
    show Component, Directive, View, NgElement;

var _visited = false;
void initReflector(reflector) {
  if (_visited) return;
  _visited = true;
  reflector
    ..registerType(
        TextBindingsCmp,
        new ReflectionInfo(const [
          const Component(selector: 'text'),
          const View(template: '{{textBindings}}')
        ], const [
          const []
        ], () => new TextBindingsCmp()))
    ..registerType(
        PropertyBindingsCmp,
        new ReflectionInfo(const [
          const Component(selector: 'props'),
          const View(template: '<div [prop-name]="propValue"></div>')
        ], const [
          const []
        ], () => new PropertyBindingsCmp()))
    ..registerType(
        EventsCmp,
        new ReflectionInfo(const [
          const Component(selector: 'events', events: const ['eventName']),
          const View(template: 'Hi')
        ], const [
          const []
        ], () => new EventsCmp()))
    ..registerType(
        SubEventsCmp,
        new ReflectionInfo(const [
          const Component(selector: 'sub-events'),
          const View(
              template: '<dependency></dependency>',
              directives: const [DependencyCmp])
        ], const [
          const []
        ], () => new SubEventsCmp()))
    ..registerType(
        TemplateEventsCmp,
        new ReflectionInfo(const [
          const Component(selector: 'template-events'),
          const View(template: '<div (mouseover)="onMouseOver()"></div>')
        ], const [
          const []
        ], () => new TemplateEventsCmp()))
    ..registerType(
        DirectivePropsCmp,
        new ReflectionInfo(const [
          const Component(selector: 'directive-props-cmp'),
          const View(
              template: '<div dir-props prop="somevalue">',
              directives: const [DirectiveProps])
        ], const [
          const []
        ], () => new DirectivePropsCmp()))
    ..registerType(
        DirectiveEventsCmp,
        new ReflectionInfo(const [
          const Component(selector: 'directive-events-cmp'),
          const View(
              template: '<div dir-events (subevent)="field = 10;">',
              directives: const [DirectiveEvents])
        ], const [
          const []
        ], () => new DirectiveEventsCmp()))
    ..registerType(
        RecursiveCmp,
        new ReflectionInfo(const [
          const Component(selector: 'recursive-cmp'),
          const View(
              template:
                  '<li *ng-for="#thing of things" [recursive-prop]="thing"><div>test</div></li>',
              directives: const [NgFor])
        ], const [
          const []
        ], () => new RecursiveCmp()))
    ..registerGetters({
      'eventName': (o) => o.eventName,
      'hprop': (o) => o.hprop,
      'propValue': (o) => o.propValue,
      'textBindings': (o) => o.textBindings,
      'thing': (o) => o.thing,
      'things': (o) => o.things
    })
    ..registerSetters({
      'field': (o, v) => o.field = v,
      'hprop': (o, v) => o.hprop = v,
      'ngForOf': (o, v) => o.ngForOf = v,
      'prop': (o, v) => o.prop = v,
      'propName': (o, v) => o.propName = v,
      'recursiveProp': (o, v) => o.recursiveProp = v
    })
    ..registerMethods({
      'doAThing': (o, List args) => Function.apply(o.doAThing, args),
      'onMouseOver': (o, List args) => Function.apply(o.onMouseOver, args)
    });
  i0.initReflector();
}
