import { MapSettings } from './../model/MapSettings.model';
import { MapData } from './../model/MapData.model';
import { MapAttack } from './../model/MapAttack.model';
import { Action } from "@ngrx/store";

export const SET_MAP_ATTACKS = 'SET_MAP_ATTACKS';
export const SET_MAP_DATA = 'SET_MAP_DATA';
export const SET_MAP_SETTINGS = 'SET_MAP_SETTINGS';
export const SET_MAP_TOKEN = 'SET_MAP_TOKEN';

export class SetMapAttacksAction implements Action{
    readonly type = SET_MAP_ATTACKS;
    constructor(public attacks: MapAttack[]){ }
}

export class SetMapDataAction implements Action{
    readonly type = SET_MAP_DATA;
    constructor(public mapData: MapData){ }
}

export class SetMapSettingsAction implements Action{
    readonly type = SET_MAP_SETTINGS;
    constructor(public mapSettings: MapSettings){ }
}

export class SetMapTokenAction implements Action{
    readonly type = SET_MAP_TOKEN;
    constructor(public token: string){ }
}

export type MapActions = SetMapAttacksAction | SetMapDataAction | SetMapSettingsAction | SetMapTokenAction;