import { Pipe, PipeTransform } from '@angular/core'; import { OptionModel } from '../models'; @Pipe({ name: 'inputDropdownSvgtextTemplateContainer', standalone: true, }) export class InputDropdownSvgtextTemplateContainerPipe implements PipeTransform { transform( option: OptionModel, options: OptionModel[], activeItem: OptionModel | null ): { [key: string]: boolean | undefined } { return { disabled: option?.disabled, 'no-result': options.length === 1 && options[0]?.type === 'no-results', 'add-new': option?.type === 'add-new', active: option.id === activeItem?.id, 'all-assigned': option?.name?.toLowerCase() === 'all assigned', trailerContainer: option?.name === 'Container', lowboyrgn: option?.name === 'Low Boy / RGN', }; } }