import { APP_ID } from '~/constants/api.constants';
import { BaseInput } from '~/core/entities/input/baseInput';
import { BaseOutput } from '~/core/entities/output/baseOutput';

export class CampEventStateOutput extends BaseOutput {
    /* tslint:disable: variable-name */
    constructor(
        public ID: string = '',
        public DisplayName: string = '',
        public Note: string = '',
    ) {
        super();
    }
    /* tslint:enable: variable-name */
}

export class CampEventOutput extends BaseOutput {
    /* tslint:disable: variable-name */
    constructor(
        public ID: number = 0,
        public DisplayName: string = '',
        public ID_Unit: number = 0,
        public Unit: string = '',
        public RegistrationNumber: string = '',
        public StartDate: string = '',
        public EndDate: string = '',
        public Location: string = '',
        public ID_EventCampState: string = '',
        public EventCampState: string = '',
        public PersonLeader: string = '',
        public MobileContact: string = '',
        public MobileContactDisplay: string = '',
        public GpsLatitude: number = 0,
        public GpsLongitude: number = 0,
        public DateReal: string = '',
    ) {
        super();
    }
    /* tslint:enable: variable-name */
}


export class EventCampAll extends BaseInput {
    /* tslint:disable: variable-name */
    constructor(
        public ID_Login: string = '',
        public DisplayName: string = '',
        public ID_EventCampState: string = '',
        public Year: number = 0,
        public IsFuture: boolean = false,
        public IsRelation: boolean = false,
        public IsChildDirect: boolean = false,
        public IsChildUnit: boolean = false,
        public RegistrationNumber: string = '',
        public Location: string = '',
        public ForEvaluation: boolean = false,
        // public ID_Unit: number = 0,
        // public Started: boolean = false,
        // public IsKraj: boolean = false,
    ) {
        super(APP_ID);
        if (!this.Year) {
            this.Year = undefined;
        }
        if (!IsFuture && IsFuture === null) {
            this.IsFuture = undefined;
        }
        if (!IsRelation) {
            this.IsRelation = undefined;
        }
        if (!IsChildDirect) {
            this.IsChildDirect = undefined;
        }
        if (!IsChildUnit) {
            this.IsChildUnit = undefined;
        }
        if (!RegistrationNumber) {
            this.RegistrationNumber = undefined;
        }
        if (!Location) {
            this.Location = undefined;
        }
        if (!ID_EventCampState) {
            this.ID_EventCampState = undefined;
        }
        if (!DisplayName) {
            this.DisplayName = undefined;
        }
        if (!ForEvaluation && ForEvaluation === null) {
            this.ForEvaluation = undefined;
        }

    }

    /* tslint:enable: variable-name */
}

export class EventCampStateAll extends BaseInput {
    constructor(
        /* tslint:disable: variable-name */
        public ID_Login: string = '',
        public DisplayName: string = '',
        /* tslint:enable: variable-name */

    ) {
        super();
    }
}