import { Action } from '@ngrx/store' ; import { DaffStateError } from '@daffodil/core/state' ; import { DaffProduct } from '@daffodil/product' ; /**
 * Action types for Best Seller Actions.
 */ export enum DaffBestSellersActionTypes { BestSellersLoadAction = '[BestSellers] Load Action' , BestSellersLoadSuccessAction = '[BestSellers] Load Success Action' , BestSellersLoadFailureAction = '[BestSellers] Load Failure Action' , BestSellersResetAction = '[BestSellers] Reset Action' } /**
 * Triggers a request for best selling products.
 */ export class DaffBestSellersLoad implements Action { readonly type = DaffBestSellersActionTypes . BestSellersLoadAction ; constructor ( ) { } } param payload export class DaffBestSellersLoadSuccess < T extends DaffProduct = DaffProduct > implements Action { readonly type = DaffBestSellersActionTypes . BestSellersLoadSuccessAction ; constructor ( public payload ) { } } param payload export class DaffBestSellersLoadFailure implements Action { readonly type = DaffBestSellersActionTypes . BestSellersLoadFailureAction ; constructor ( public payload ) { } } /**
 * Resets the state of the best sellers redux store to its initial state.
 */ export class DaffBestSellersReset implements Action { readonly type = DaffBestSellersActionTypes . BestSellersResetAction ; constructor ( ) { } } export type DaffBestSellersActions < T extends DaffProduct = DaffProduct > = DaffBestSellersLoad | DaffBestSellersLoadSuccess < T > | DaffBestSellersLoadFailure | DaffBestSellersReset ;