import { Action } from '@ngrx/store' ; import { type } from './../utils' ; import { Movie } from './../models' ; export const ActionTypes = { LOAD_CHECK_CACHE : type ( "[Movie] Load Check Cache" ) , LOAD : type ( "[Movie] Load" ) , LOAD_SUCCESS : type ( "[Movie] Load Success" ) , LOAD_FAIL : type ( "[Movie] Load Fail" ) , SELECT : type ( "[Movie] Select" ) , } ; export class LoadCheckCacheAction implements Action { readonly type = ActionTypes . LOAD_CHECK_CACHE ; constructor ( public payload ) { } } export class LoadAction implements Action { readonly type = ActionTypes . LOAD ; constructor ( public payload ) { } } export class LoadSuccessAction implements Action { readonly type = ActionTypes . LOAD_SUCCESS ; constructor ( public payload ) { } } export class LoadFailAction implements Action { readonly type = ActionTypes . LOAD_FAIL ; constructor ( public payload ) { } } export class SelectAction implements Action { readonly type = ActionTypes . SELECT ; param payload constructor ( public payload ) { } } export type Actions = LoadCheckCacheAction | LoadAction | LoadSuccessAction | LoadFailAction | SelectAction ;