import { ModuleSwitcher } from '../../models/app-switcher.enum';

export const APP_SET_CURRENT_PROCESS = '[APP] Set current process';
export const APP_ADD_PROCESS = '[APP] Add new process';
export const APP_DELETE_PROCESS = '[APP] Add delete process';
export const APP_SYNCED_USER = '[APP] User data synced with server';
export const APP_RELOAD_SAVED_STATE = '[APP] Reload Saved state';
export const APP_SWITCH_MODULE = '[APP] Switch between modules';

export class AppSetCurrentProcess {
  static readonly type = APP_SET_CURRENT_PROCESS;

  constructor(public payload: number) {}
}

export class AppAddProcess {
  static readonly type = APP_ADD_PROCESS;

  constructor(public payload: number) {}
}

export class AppDeleteProcess {
  static readonly type = APP_DELETE_PROCESS;

  constructor(public payload: number) {}
}

export class AppUserDataSync {
  static readonly type = APP_SYNCED_USER;

  constructor(public data: string, public sync: boolean = false) {}
}

export class ReloadSavedState {
  static readonly type = APP_RELOAD_SAVED_STATE;

  constructor(public data: string, public sync: boolean = false) {}
}

export class AppSwitchModule {
  static readonly type = APP_SWITCH_MODULE;

  constructor(public payload: ModuleSwitcher) {}
}
