import { UnitSearchModel } from '../../types/UnitSearch';

export interface GenEventNewForm {
    type: number;
    scope: number;
    name: string;
    startDate: Date;
    startTime: string;
    endDate: Date;
    endTime: string;
    street: string;
    city: string;
    postCode: string;
    region: string;
    state: string;
    note: string;
    gpsLatitude: string;
    gpsLongitude: string;
    unitId: number;

};

export class NewGenEvent {
    static readonly type = '[NewGenEvent] New Gen Event';
    constructor(public payload: GenEventNewForm) {
    }
}

export class UpdateGenEvent {
    static readonly type = '[NewGenEvent] Update Gen Event';
    constructor(public payload: GenEventNewForm, public eventId: number) {
    }
}

export class DeleteGenEvent {
    static readonly type = '[NewGenEvent] Delete Gen Event';
    constructor(public id: number) {
    }
}


export class LoadRegions {
    static readonly type = '[NewGenEvent] Load Regions';
}

export class SearchUnits {
    static readonly type = '[NewGenEvent] Search Units';
    constructor(public options: UnitSearchModel,
        public typeId: string = undefined) {
    }
}
