import { Pipe, PipeTransform } from '@angular/core'; @Pipe({ name: 'toolbarTabsClassPipe', standalone: true, }) export class ToolbarTabsClassPipe implements PipeTransform { transform({ isLargeLayout, isLargeAndActive, isLargeAndInActive, isSmallActive, isSmallAndInActive, isDisabled, }: { isLargeLayout: boolean; isLargeAndActive: boolean; isLargeAndInActive: boolean; isSmallActive: boolean; isSmallAndInActive: boolean; isDisabled: boolean; }): string { const classMap: { [key: string]: boolean } = { 'd-flex align-items-center gap-1 p-8 text-size-16 line-height-20': isLargeLayout, 'text-color-white h-36': isLargeAndActive, 'text-color-bw6-2': isLargeAndInActive, 'text-size-14 p-x-8 p-y-4': !isLargeLayout, 'text-color-black': isSmallActive, 'text-color-light-grey-2': isSmallAndInActive, 'pe-none opacity-50': isDisabled, }; return Object.keys(classMap) .filter((className) => classMap[className]) .join(' '); } }