import { Pipe, PipeTransform } from '@angular/core';
import { DictionariesService } from '@modules/components/page-filters/services/dictionaries-service';

@Pipe({
    name: 'cityName',
})
export class CityNamePipe implements PipeTransform {
    constructor(private dictionaries: DictionariesService) {}

    transform(code: string): string {
        return this.dictionaries.getCityOrAirport(code)?.name;
    }
}
