import { ChangeDetectionStrategy , Component } from '@angular/core' ; import { GameState } from '../../../models/decktracker/game-state' ; import { Preferences } from '../../../models/preferences' ; import { PreferencesService } from '../../../services/preferences.service' ; @ Component ( { selector : 'decktracker-overlay-opponent' , styleUrls : [ ] , template : `
		<decktracker-overlay-root
			[overlayWidthExtractor]="overlayWidthExtractor"
			[overlayDisplayModeExtractor]="overlayDisplayModeExtractor"
			[opacityExtractor]="opacityExtractor"
			[scaleExtractor]="scaleExtractor"
			[cardsGoToBottomExtractor]="cardsGoToBottomExtractor"
			[showGlobalEffectsExtractor]="showGlobalEffectsExtractor"
			[darkenUsedCardsExtractor]="darkenUsedCardsExtractor"
			[hideGeneratedCardsInOtherZoneExtractor]="hideGeneratedCardsInOtherZoneExtractor"
			[sortCardsByManaCostInOtherZoneExtractor]="sortCardsByManaCostInOtherZoneExtractor"
			[deckExtractor]="deckExtractor"
			[showDeckWinrateExtractor]="showDeckWinrateExtractor"
			[showMatchupWinrateExtractor]="showMatchupWinrateExtractor"
			closeEvent="CLOSE_OPPONENT_TRACKER"
			player="opponent"
		>
		</decktracker-overlay-root>
	` , changeDetection : ChangeDetectionStrategy . OnPush , } ) export class DeckTrackerOverlayOpponentComponent { overlayWidthExtractor = ( prefs ) => prefs . opponentOverlayWidthInPx ; overlayDisplayModeExtractor = ( prefs ) => ! prefs . opponentOverlayGroupByZone ? 'DISPLAY_MODE_GROUPED' : 'DISPLAY_MODE_ZONE' ; opacityExtractor = ( prefs ) => prefs . opponentOverlayOpacityInPercent ; scaleExtractor = ( prefs ) => prefs . opponentOverlayScale ; cardsGoToBottomExtractor = ( prefs ) => prefs . opponentOverlayCardsGoToBottom ; showGlobalEffectsExtractor = ( prefs ) => prefs . opponentOverlayShowGlobalEffects ; darkenUsedCardsExtractor = ( prefs ) => prefs . opponentOverlayDarkenUsedCards ; hideGeneratedCardsInOtherZoneExtractor = ( prefs ) => prefs . opponentOverlayHideGeneratedCardsInOtherZone ; sortCardsByManaCostInOtherZoneExtractor = ( prefs ) => prefs . opponentOverlaySortByManaInOtherZone ; deckExtractor = ( state ) => state . opponentDeck ; showDeckWinrateExtractor = ( prefs ) => false ; showMatchupWinrateExtractor = ( prefs ) => false ; constructor ( private prefs ) { } }