import { Component , OnInit } from '@angular/core' ; import { ModalService , PageLayoutService , ProductListComponent , ProductListComponentService , ViewConfig , ViewModes , } from '@spartacus/storefront' ; import { DvntProductFacetNavigationComponent } from '../dvnt-product-facet-navigation/dvnt-product-facet-navigation.component' ; @ Component ( { selector : 'app-dvnt-product-list' , templateUrl : './dvnt-product-list.component.html' , styleUrls : [ './dvnt-product-list.component.scss' ] , } ) export class DvntProductListComponent extends ProductListComponent implements OnInit { viewModes = ViewModes ; constructor ( pageLayoutService , productListComponentService , scrollConfig , private modalService ) { super ( pageLayoutService , productListComponentService , scrollConfig ) ; } showProductFacetNavigationModal ( ) { this . modalService . open ( DvntProductFacetNavigationComponent , { windowClass : 'side-modal slide-from-left' , backdropClass : 'side-modal-backdrop' , beforeDismiss : ( ) => { return new Promise ( ( resolve ) => { resolve ( true ) ; } ) ; } , } ) ; } ngOnInit ( ) { super . ngOnInit ( ) ; this . setViewMode ( ViewModes . Grid ) ; } }