//  APIClient.h
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface APIClient : NSObject

+ (void)requestAccessItem:(NSString *)unitId
                 completion:(void(^)(BOOL success, NSDictionary * _Nullable response, NSError * _Nullable error))completion;

+ (void)requestGetUnitPlan:(void (^)(NSDictionary * _Nullable data, NSError * _Nullable error))completion;

+ (void)requestSettingsByLocation:(NSString * _Nonnull)locationID
                      projectID:(NSString * _Nonnull)projectID
                     completion:(void (^)(NSDictionary * _Nullable data, NSError * _Nullable error))completion;

+ (void)submitAddIssue:(NSDictionary * _Nonnull)params
                images:(NSArray<UIImage *> * _Nullable)images
            completion:(void (^)(NSDictionary * _Nullable data, NSError * _Nullable error))completion;

+ (void)submitUpdateIssue:(NSDictionary * _Nonnull)updateData
                   images:(NSArray<UIImage *> * _Nullable)images
               completion:(void (^)(NSDictionary * _Nullable response, NSError * _Nullable error))completion;

+ (void)requestAppointment:(void (^)(NSDictionary * _Nullable data, NSError * _Nullable error))completion;

+ (void)requestGeneralInfo:(void (^)(NSDictionary * _Nullable data, NSError * _Nullable error))completion;

+ (void)submitAppointment:(NSDictionary *)appointmentData
                 completion:(void(^)(BOOL success, NSDictionary * _Nullable response, NSError * _Nullable error))completion;

+ (void)submitRepresentativeAppointment:(NSDictionary *)repData
                                 completion:(void(^)(BOOL success, NSDictionary * _Nullable response, NSError * _Nullable error))completion;

+ (void)requestCancelAppointment:(id)appointmentId
                        reason:(NSString *)reason
                    completion:(void (^)(NSDictionary * _Nullable data, NSError * _Nullable error))completion;

+ (void)requestDashboardInfo:(void (^)(NSDictionary *data, NSError *error))completion;

+ (void)requestAnnouncement:(void (^)(NSDictionary *data, NSError *error))completion;

+ (void)requestHistory:(NSString *)issueID
          completion:(void (^)(NSDictionary *data, NSError *error))completion;

+(void)submitAddInfo:(NSString *)issueID
            remarks:(NSString *)remarks
         completion:(void (^)(NSDictionary *data, NSError *error))completion;

+ (void)uploadAddInfo:(NSString *)issueID
              remarks:(NSString *)remarks
               images:(NSArray<UIImage *> *)images
             mediaURL:(NSURL *)mediaURL
            mediaType:(NSString *)mediaType
           completion:(void (^)(NSDictionary *data, NSError *error))completion;

+ (void)requestIssues:(void (^)(NSDictionary *data, NSError *error))completion;

+ (void)requestVoidIssue:(id)issueID
               remarks:(NSString *)remarks
            completion:(void (^)(NSDictionary *data, NSError *error))completion;

+ (void)requestDeleteIssue:(id)issueID
               remarks:(NSString *)remarks
            completion:(void (^)(NSDictionary *data, NSError *error))completion;

+ (void)requestCommonArea:(void (^)(NSDictionary * _Nullable data, NSError * _Nullable error))completion;

+ (void)requestGeneralSettings:(void (^)(NSDictionary * _Nullable data, NSError * _Nullable error))completion;

+ (void)requestDefectMatrix:(void (^)(NSDictionary * _Nullable data, NSError * _Nullable error))completion;

+ (void)requestProjectList:(void (^)(NSDictionary * _Nullable data, NSError * _Nullable error))completion;

+ (void)requestArrayImage:(NSArray *)imageArray
                completion:(void (^)(NSDictionary *data, NSError *error))completion;

+ (void)downloadAndCacheImage:(NSURL *)url
                   completion:(void (^)(BOOL success))completion; 

@end

NS_ASSUME_NONNULL_END
