import { Component, Inject } from '@angular/core'; import { Router } from '@angular/router'; import { WptDialogRef, WPT_DIALOG_DATA } from '@arrow/warpaint/dialog'; import { ConfigService } from '@arrow/bom/config'; import { CurrencyConverterPipe } from '@arrow/bom/shared'; export interface AddedDialogData { quoteOnlyMode: boolean; addedToCartCount: number; addedToQuoteCount: number; notAddedCount: number; inCartCount: number; subTotal: number; } @Component({ templateUrl: './added-dialog.component.html', styleUrls: ['./added-dialog.component.scss'] }) export class AddedDialogComponent { constructor( private ref: WptDialogRef, @Inject(WPT_DIALOG_DATA) public data: AddedDialogData, private configService: ConfigService, private router: Router, public currencyConverter: CurrencyConverterPipe ) {} close(): void { this.ref.close(); } viewCart(): void { this.router.navigate([this.configService.getRoute('maw-cart')]); this.ref.close(); } viewQuotes(): void { this.router.navigate([this.configService.getRoute('maw-quote')]); this.ref.close(); } }