//
// BusProductApi.h
// Project
//
// Created by Ziv on 2017/5/17.
//
//

#import <Foundation/Foundation.h>
#import "JavaAppAPI.h"
#import "ScheduleStop.h"
#import "Schedule.h"
#import "Product.h"
#import "ScheduleAPI.h"


@interface BusStatusApi: JavaAppAPI
+ (NSAttributedString *)attributedStringForBusStatusLocationWithPlacemark:(CLPlacemark *)placemark timestamp:(NSDate *)timestamp product:(Product *)product schedule:(Schedule *)schedule;
@end



@interface BusStatusDetail : StopScheduleApi
@property (nonatomic, strong) NSString *departureDate;
@property (nonatomic, assign) NSInteger productId;
@property (nonatomic, assign) NSInteger scheduleId;
@property (nonatomic, assign) BOOL editing;
@property(nonatomic, assign) BOOL isDBDSearch;
@end

@interface BusStatusTimeBean : NSObject
@property (nonatomic, assign) NSInteger status;
@property (nonatomic, strong) NSString *time;
@property (nonatomic, assign) BOOL isPassed;
@end

@interface BusStatusDetailBean : NSObject
@property (nonatomic, strong) ScheduleStop *scheduleStop;
@property (nonatomic, strong) BusStatusTimeBean *departureStopStatus;
@property (nonatomic, strong) BusStatusTimeBean *arrivalStopStatus;
@property (nonatomic, assign) BOOL isShowNextDay;
@property (nonatomic, strong) NSString *nextDayValue;
@property (nonatomic, strong) NSArray<DriverBean *> *assignedDrivers;
@property (nonatomic, assign) BOOL driverAssigned;
@property(nonatomic, assign)  NSInteger dateIndex;
@property (nonatomic, assign, readonly) BOOL isCancelled;
@property(nonatomic, assign) NSInteger combinationDepCross;
@property(nonatomic, assign) NSInteger combinationArrCross;
@property (nonatomic, strong, readonly) NSAttributedString *attributedScheduledTimeText;
@property (nonatomic, strong, readonly) NSAttributedString *attributedStatusTimeText;
@end

@interface BusStatusLocationBean : NSObject
@property (nonatomic, assign) CGFloat latitude;
@property (nonatomic, assign) CGFloat longitude;
@property (nonatomic, strong) NSString *updateTime;
@end

@interface BusStatusDetailResponse : JavaAppAPIResponse
@property (nonatomic, assign) CGFloat locationIndex;
@property (nonatomic, assign) CGFloat locationPercent;
@property (nonatomic, assign) CGFloat currentIndex;
@property (nonatomic, strong) BusStatusLocationBean *currentLocation;
@property (nonatomic, strong) NSArray<BusStatusDetailBean *> *resultList;
@property (nonatomic, assign, readonly) NSInteger stopIndex;
@property (nonatomic, assign, readonly) CGFloat stopProgress;
@end

@interface ScheduleDriverAssignInfo : StopScheduleApi
@property (nonatomic, strong) NSString *departureDate;
@property (nonatomic, assign) BOOL isDBDSearch;
@end

@interface ScheduleDriverAssignInfoResponse : JavaAppAPIResponse
@property (nonatomic, strong) NSArray *routeList;
@end

@interface UpdateBusStatusTime : BusStatusApi
@property (nonatomic, assign) NSInteger scheduleId;
@property (nonatomic, strong) NSString *serviceDate;
@property (nonatomic, assign) NSInteger stopId;
@property (nonatomic, assign) BOOL isArrival;
@property (nonatomic, strong) NSString *dateTime;
@end
