import { Injectable } from '@angular/core' ; import { Dictionary } from '@ngrx/entity' ; import { Action } from '@ngrx/store' ; import { BehaviorSubject } from 'rxjs' ; import { DaffStateError } from '@daffodil/core/state' ; import { DaffOrder , DaffOrderTotal , } from '@daffodil/order' ; import { DaffOrderFacadeInterface } from '@daffodil/order/state' ; inheritdoc @ Injectable ( { providedIn : 'root' } ) export class MockDaffOrderFacade implements DaffOrderFacadeInterface { loading$ : BehaviorSubject < boolean > = new BehaviorSubject ( null ) ; errors$ : BehaviorSubject < DaffStateError [ ] > = new BehaviorSubject ( [ ] ) ; orders$ : BehaviorSubject < DaffOrder [ ] > = new BehaviorSubject ( [ ] ) ; orderIds$ : BehaviorSubject < DaffOrder [ 'id' ] [ ] > = new BehaviorSubject ( [ ] ) ; orderCount$ : BehaviorSubject < number > = new BehaviorSubject ( null ) ; orderEntities$ : BehaviorSubject < Dictionary < DaffOrder > > = new BehaviorSubject ( { } ) ; placedOrder$ : BehaviorSubject < DaffOrder > = new BehaviorSubject ( null ) ; hasPlacedOrder$ : BehaviorSubject < boolean > = new BehaviorSubject ( false ) ; getOrder$ ( orderId ) { return new BehaviorSubject ( null ) ; } getTotals$ ( orderId ) { return new BehaviorSubject ( [ ] ) ; } getAppliedCodes$ ( orderId ) { return new BehaviorSubject ( [ ] ) ; } getItems$ ( orderId ) { return new BehaviorSubject ( [ ] ) ; } getBillingAddresses$ ( orderId ) { return new BehaviorSubject ( [ ] ) ; } getShippingAddresses$ ( orderId ) { return new BehaviorSubject ( [ ] ) ; } getShipments$ ( orderId ) { return new BehaviorSubject ( [ ] ) ; } getPayment$ ( orderId ) { return new BehaviorSubject ( null ) ; } getInvoices$ ( orderId ) { return new BehaviorSubject ( [ ] ) ; } getCredits$ ( orderId ) { return new BehaviorSubject ( [ ] ) ; } getGrandTotal$ ( orderId ) { return new BehaviorSubject ( null ) ; } ; getSubtotal$ ( orderId ) { return new BehaviorSubject ( null ) ; } ; getShippingTotal$ ( orderId ) { return new BehaviorSubject ( null ) ; } ; getDiscountTotal$ ( orderId ) { return new BehaviorSubject ( null ) ; } ; hasDiscount$ ( orderId ) { return new BehaviorSubject ( false ) ; } ; getTaxTotal$ ( orderId ) { return new BehaviorSubject ( null ) ; } ; dispatch ( action ) { } ; }