import { FlightStatusLegacy } from '../../enumerators';
import { IArrivalStationContract } from './arrival-station.contract';
import { IDepartureStationContract } from './departure-station.contract';

import { IDaysOfWeek } from '../days-of-week.model';
import { EquipmentModel } from '../equipment.model';
import { PassengersModel } from '../passengers.model';
import { TrafficRestrictionsModel } from '../traffic-restrictions.model';

type ILegContractFlags = {
    checkinAvailable: boolean;
    returnToAirport: boolean;
    routeChanged: boolean;
};

export interface ILegContract {
    updated: Date;
    status: FlightStatusLegacy;
    departure: IDepartureStationContract;
    arrival: IArrivalStationContract;
    daysOfWeek: IDaysOfWeek;
    equipment: EquipmentModel;
    passengers: PassengersModel;
    trafficRestrictions: TrafficRestrictionsModel;
    flags: ILegContractFlags;
}
