import { Injectable } from '@angular/core' ; import { AllCardsService , ReferenceCard } from '@firestone-hs/reference-data' ; import { OverwolfService } from './overwolf.service' ; @ Injectable ( ) export class CardsFacadeService { private readonly service : AllCardsService ; constructor ( private readonly ow ) { this . service = this . ow ?. getMainWindow ( ) ?. cards ; if ( ! this . service && this . ow ) { console . error ( 'cards service should have been initialized' , new Error ( ) . stack ) ; } } public getCard ( id , errorWhenUndefined = true ) { return this . service . getCard ( id , errorWhenUndefined ) ; } public getCardFromDbfId ( dbfId ) { return this . service . getCardFromDbfId ( dbfId ) ; } public getCardsFromDbfIds ( dbfIds ) { return this . service . getCardsFromDbfIds ( dbfIds ) ; } public getCards ( ) { return this . service . getCards ( ) ; } public getService ( ) { return this . service ; } }