import { UsersStoriesModel } from '../../components/users-stories/users-stories.model' ; import { apiGetAllMainTabs , apiGetAllNews , apiGetAllStories } from './main.constant' ; import { MainTabModel , NewsModel } from './main.model' ; export namespace MainTabsActions { export class FetchMainTabs { static readonly type = '[Main Tab] Fetch tabs' ; constructor ( public api = apiGetAllMainTabs ) { } } export class FetchMainTabsSuccess { static readonly type = '[Main Tab] Fetch tabs success' ; constructor ( public listData ) { } } export class FetchMainTabsFail { static readonly type = '[Main Tab] Fetch tabs fail' ; constructor ( public error ) { } } } export namespace StoriesActions { export class FetchStories { static readonly type = '[Main Tab] Fetch stories' ; constructor ( public api = apiGetAllStories ) { } } export class FetchStoriesSuccess { static readonly type = '[Main Tab] Fetch stories success' ; constructor ( public listData ) { } } export class FetchStoriesFail { static readonly type = '[Main Tab] Fetch stories fail' ; constructor ( public error ) { } } } export namespace FetchNewsActions { export class FetchNews { static readonly type = '[Main Tab] Fetch news' ; constructor ( public page , public isRefresh = false , public api = apiGetAllNews ( ) ) { this . api = apiGetAllNews ( this . page ) ; } } export class FetchNewsSuccess { static readonly type = '[Main Tab] Fetch news success' ; constructor ( public listData , public page ) { } } export class FetchNewsFail { static readonly type = '[Main Tab] Fetch news fail' ; constructor ( public error ) { } } }