export type JobEndReason = 'graceful' | 'forced' | 'death' | 'jailed' | 'vehicle_destroyed' | 'inactive';

export interface ActiveJob {
    readonly jobId: string;
    readonly companyId: number;
    inactiveMinutes: number;

    canJoin(player: PlayerMpLoggedIn): true | string;
    join(player: PlayerMpLoggedIn): void;
    remove(player: PlayerMpLoggedIn): void;
    onKey(player: PlayerMpLoggedIn): Promise<void>;
    showInfo(player: PlayerMpLoggedIn): void;
    requestGracefulEnd(player: PlayerMpLoggedIn): void;
    end(reason: JobEndReason): void;
    start(): void;
    hasPlayers(): boolean;
    getPlayerIds(): number[];
    onVehicleDestroyed?(vehicle: VehicleMp): void;
}
