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AC;YACT,QAAQ,EAAE,MAAM,CAAC,EAAE;YACnB,QAAQ,EAAE,YAAY;YACtB,WAAW,EAAE,cAAc;YAC3B,SAAS,EAAE,CAAC,aAAa,CAAC;YAC1B,eAAe,EAAE,uBAAuB,CAAC,MAAM;YAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;SACtC,CAAC;;iBAAA;IA4BF,gBAAC;AAAD,CA3BA,AA2BC,IAAA;AAOD;IAAA;IAOA,CAAC;IANQ,uBAAO,GAAd;QACE,MAAM,CAAC;YACL,QAAQ,EAAE,eAAe;YACzB,SAAS,EAAE,EAAE;SACd,CAAC;IACJ,CAAC;IAVH;QAAC,QAAQ,CAAC;YACR,OAAO,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC;YAClC,YAAY,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC;SACxC,CAAC;;uBAAA;IAQF,sBAAC;AAAD,CAPA,AAOC,IAAA","file":"toolbar/toolbar.js","sourcesContent":["import {\n NgModule,\n ModuleWithProviders,\n Component,\n ChangeDetectionStrategy,\n Input,\n ViewEncapsulation,\n Directive\n} from '@angular/core';\nimport {Renderer} from '@angular/core';\nimport {ElementRef} from '@angular/core';\n\n@Directive({\n selector: 'md-toolbar-row'\n})\nexport class MdToolbarRow {}\n\n@Component({\n moduleId: module.id,\n selector: 'md-toolbar',\n templateUrl: 'toolbar.html',\n styleUrls: ['toolbar.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class MdToolbar {\n\n private _color: string;\n\n constructor(private elementRef: ElementRef, private renderer: Renderer) { }\n\n @Input()\n get color(): string {\n return this._color;\n }\n\n set color(value: string) {\n this._updateColor(value);\n }\n\n private _updateColor(newColor: string) {\n this._setElementColor(this._color, false);\n this._setElementColor(newColor, true);\n this._color = newColor;\n }\n\n private _setElementColor(color: string, isAdd: boolean) {\n if (color != null && color != '') {\n this.renderer.setElementClass(this.elementRef.nativeElement, `md-${color}`, isAdd);\n }\n }\n\n}\n\n\n@NgModule({\n exports: [MdToolbar, MdToolbarRow],\n declarations: [MdToolbar, MdToolbarRow],\n})\nexport class MdToolbarModule {\n static forRoot(): ModuleWithProviders {\n return {\n ngModule: MdToolbarModule,\n providers: []\n };\n }\n}\n"],"sourceRoot":"/source/"}
\No newline at end of file