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C;YACR,OAAO,EAAE,CAAC,GAAG,CAAC;YACd,YAAY,EAAE,CAAC,GAAG,CAAC;SACpB,CAAC;;iBAAA;IAQF,gBAAC;AAAD,CAPA,AAOC,IAAA","file":"core/rtl/dir.js","sourcesContent":["import {\n NgModule,\n ModuleWithProviders,\n Directive,\n HostBinding,\n Output,\n Input,\n EventEmitter\n} from '@angular/core';\n\nexport type LayoutDirection = 'ltr' | 'rtl';\n\n/**\n * Directive to listen to changes of direction of part of the DOM.\n *\n * Applications should use this directive instead of the native attribute so that Material\n * components can listen on changes of direction.\n */\n@Directive({\n selector: '[dir]',\n // TODO(hansl): maybe `$implicit` isn't the best option here, but for now that's the best we got.\n exportAs: '$implicit'\n})\nexport class Dir {\n @Input('dir') private _dir: LayoutDirection = 'ltr';\n\n @Output() dirChange = new EventEmitter<void>();\n\n @HostBinding('attr.dir')\n get dir(): LayoutDirection {\n return this._dir;\n }\n set dir(v: LayoutDirection) {\n let old = this._dir;\n this._dir = v;\n if (old != this._dir) {\n this.dirChange.emit(null);\n }\n }\n\n get value(): LayoutDirection { return this.dir; }\n set value(v: LayoutDirection) { this.dir = v; }\n}\n\n\n@NgModule({\n exports: [Dir],\n declarations: [Dir]\n})\nexport class RtlModule {\n static forRoot(): ModuleWithProviders {\n return {\n ngModule: RtlModule,\n providers: []\n };\n }\n}\n"],"sourceRoot":"/source/"}
\No newline at end of file