UNPKG

@taiga-ui/kit

Version:

Taiga UI Angular main components kit

28 lines (24 loc) 1.08 kB
import * as i0 from '@angular/core'; import { inject, Pipe } from '@angular/core'; import { TUI_ASSETS_PATH } from '@taiga-ui/core/tokens'; class TuiFlagPipe { constructor() { this.staticPath = inject(TUI_ASSETS_PATH); } transform(countryIsoCode) { return countryIsoCode ? `${this.staticPath}/flags/${countryIsoCode.toLowerCase()}.svg` : null; } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TuiFlagPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); } static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.21", ngImport: i0, type: TuiFlagPipe, isStandalone: true, name: "tuiFlag" }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TuiFlagPipe, decorators: [{ type: Pipe, args: [{ name: 'tuiFlag' }] }] }); /** * Generated bundle index. Do not edit. */ export { TuiFlagPipe }; //# sourceMappingURL=taiga-ui-kit-pipes-flag.mjs.map