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

export interface CampEventNewForm {
    typeIds: string[];
    name: string;
    startDate: Date;
    endDate: Date;
    region: string;
    gpsLatitude: string;
    gpsLongitude: string;
    unitId: number;
    location: string;
    subUnitIds: string[]
    note: string;
    mobile: string;
    postCode: string;
    isFloodArea: boolean;
    campPlaceId: number;
};

export class NewCampEvent {
    static readonly type = '[NewCampEvent] New Camp Event';
    constructor(public payload: CampEventNewForm) {
    }
}

export class UpdateCampEvent {
    static readonly type = '[NewCampEvent] Update Camp Event';
    constructor(public payload: CampEventNewForm, public eventId: number) {
    }
}

export class DeleteCampEvent {
    static readonly type = '[NewCampEvent] Delete Camp Event';
    constructor(public id: number) {
    }
}


export class LoadCampPlaceAll {
    static readonly type = '[NewCampEvent] LoadCampPlaceAll';
}
export class LoadUnitAllCamp {
    static readonly type = '[NewCampEvent] LoadUnitAllCamp';
}
export class LoadCampTypes {
    static readonly type = '[NewCampEvent] Load Types';
}

export class SearchUnits {
    static readonly type = '[NewCampEvent] Search Units';
    constructor(public options: UnitSearchModel) {
    }
}
