import { ILegContract, IRouteContract } from './contracts';
import { IFlightId } from './flight-id.model';
import { FlightModel } from './flight.model';
import { Leg } from './leg.model';
import { RouteModel } from './route.model';

export interface IFlightFactory {
    createFlight: (contract: IRouteContract) => FlightModel;
    createLeg: (contract: ILegContract) => Leg;
}
export interface IFlightStrategy {
    getLegs(flight: RouteModel): Leg[];
    getFlights(flight: RouteModel): FlightModel[];
    getFirstLeg(flight: RouteModel): Leg;
    getCurrentLeg(flight: RouteModel): Leg;
    getLastLeg(flight: RouteModel): Leg;
    getFirstFlight(flight: RouteModel): FlightModel;
    getLastFlight(flight: RouteModel): FlightModel;
    getFlightId(flight: RouteModel, isLast?: boolean): IFlightId;
    fromContract: (contract: IRouteContract, factory: IFlightFactory) => Partial<FlightModel>;
}
