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

export class CongEventOutput extends BaseOutput {
    /* tslint:disable: variable-name */
    constructor(
        public ID: number = 0,
        public ID_Event: number = 0,
        public Event: string = '',
        public PromulgationDeadline: string = '',
        public CommissionDeadline: string = '',
        public CandidateDeadline: string = '',
        public ID_EventCongressType: string = '',
        public EventCongressType: string = '',
        public ID_Unit: number = 0,
        public Unit: string = '',
        public StartDate: string = '',
        public EndDate: string = '',
        public GpsLatitude: number = 0,
        public GpsLongitude: number = 0,
        public Location: string = '',
        public AlternateStartDate: string = '',
        public AlternateEndDate: string = '',
        public AlternateGpsLatitude: number = 0,
        public AlternateGpsLongitude: number = 0,
        public AlternateLocation: string = '',
        public Note: string = '',
        public ID_UnitRegistration: number = 0,
        public Year: number = 0,
        public EventCongressState: string = '',
        public ID_EventCongressState: string = '',
        public StartEndDate: string = '',
        public SimplifiedEntryExtension: string = '',
        public ProtocolExtension: string = '',
        public ID_DocumentProtocol: number = 0,
        public ID_DocumentSimplifiedEntry: number = 0,
    ) {
        super();
    }
    /* tslint:enable: variable-name */
}


export class EventCongressAll extends BaseInput {
    /* tslint:disable: variable-name */
    constructor(
        public ID_Login: string = '',
        // public DisplayName: string = '',
        // public ID_EventCongressType: string = '',
        // public ID_EventCongressState: string = '',
        // public ID_UnitType: string = '',
        public ID_Unit: number = 0,
        public IsFuture: boolean = false,
        public IsChildDirect: boolean = false,
        public IsChildUnit: boolean = false,
        public IsParticipant: boolean = false,
        // public IsUnit: boolean = false,
    ) {
        super(APP_ID);

        if (!IsFuture && IsFuture === null) {
            this.IsFuture = undefined;
        }
        // if (!IsUnit && IsUnit === null) {
        //     this.IsUnit = undefined;
        // }
        if (!IsParticipant && IsParticipant === null) {
            this.IsParticipant = undefined;
        }

        if (!IsChildDirect && IsParticipant === null) {
            this.IsChildDirect = undefined;
        }
        if (!IsChildUnit && IsParticipant === null) {
            this.IsChildUnit = undefined;
        }

        // if (!ID_EventCongressType) {
        //     this.ID_EventCongressType = undefined;
        // }

        if (!ID_Unit) {
            this.ID_Unit = undefined;
        }
        // if (!ID_EventCongressState) {
        //     this.ID_EventCongressState = undefined;
        // }
        // if (!DisplayName) {
        //     this.DisplayName = undefined;
        // }

    }

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