import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
  name: 'shelfEditActionInProgress',
})
export class ShelfEditActionInProgressPipe implements PipeTransform {
  transform(statusChangeInProgress: boolean, target: HTMLButtonElement, currentTarget: HTMLButtonElement): boolean {
    if (!statusChangeInProgress) {
      return false;
    }

    const isActiveButton = target === currentTarget;

    return isActiveButton;
  }
}
