import { AfterContentInit , ChangeDetectionStrategy , ChangeDetectorRef , Component , ElementRef , Renderer2 , } from '@angular/core' ; import { CardsFacadeService } from '../../../services/cards-facade.service' ; import { OverwolfService } from '../../../services/overwolf.service' ; import { PreferencesService } from '../../../services/preferences.service' ; import { AppUiStoreFacadeService } from '../../../services/ui-store/app-ui-store-facade.service' ; import { AbstractCounterWidgetWrapperComponent , templateBase } from './abstract-counter-widget-wrapper.component' ; @ Component ( { selector : 'opponent-hero-power-damage-widget-wrapper' , styleUrls : [ '../../../../css/component/overlays/decktracker-player-widget-wrapper.component.scss' ] , template : templateBase , changeDetection : ChangeDetectionStrategy . OnPush , } ) export class OpponentHeroPowerDamageWidgetWrapperComponent extends AbstractCounterWidgetWrapperComponent implements AfterContentInit { constructor ( private readonly allCards , protected readonly ow , protected readonly el , protected readonly prefs , protected readonly renderer , protected readonly store , protected readonly cdr ) { super ( ow , el , prefs , renderer , store , cdr ) ; this . side = 'opponent' ; this . activeCounter = 'heroPowerDamage' ; } ngAfterContentInit ( ) { this . prefExtractor = ( prefs ) => prefs . opponentHeroPowerDamageCounter ; this . deckStateExtractor = ( state ) => state ?. opponentDeck ?. heroPowerDamageThisMatch > 0 && state . opponentDeck . hero ?. playerClass === 'mage' ; super . ngAfterContentInit ( ) ; } }