//
//  KGKakaoTalkMessage.h
//  KakaoGame SDK
//
//  Created by Ronaldo Kim on 2016. 9. 19..
//  Copyright (c) 2016. Kakao Corp. All rights reserved.
//

#import <KakaoGame/KGKakaoProfile.h>
#import <KakaoGameKakao/KGKakaoTalkGroupChat.h>

/**
 * @brief KGKakaoTalkMessage클래스는 카카오톡 메시지 전송 기능을 제공한다.
 */
@interface KGKakaoTalkMessage : NSObject

/**
 * @brief 카카오톡 메시지 수신 허용 설정 뷰를 띄운다.
 *
 * @param completionHandler 완료 핸들러 [error:닫기 결과][isAllowedMessage:메시지 수신 허용 여부].
 */
+ (void)showAllowMessageSettingViewWithCompletionHandler:(void(^)(NSError *error, BOOL isAllowedMessage))completionHandler;

/**
 * @brief 카카오톡 초대 메시지를 전송한다.(링크4.0)
 *
 * @param kakaoProfile 메시지를 수신할 카카오 프로필.
 * @param templateId 메시지 템플릿 아이디.
 * @param argumentDic 기타 데이터 딕셔너리.
 * @param completionHandler 완료 핸들러 [error:전송 결과].
 */
+ (void)sendNewInviteMessageWithKakaoProfile:(KGKakaoProfile *)kakaoProfile
								  templateId:(NSString *)templateId
								 argumentDic:(NSDictionary *)argumentDic
						   completionHandler:(void (^)(NSError *error))completionHandler;

/**
 * @brief 카카오톡 게임 메시지를 전송한다.(링크4.0)
 *
 * @param kakaoProfile 메시지를 수신할 카카오 프로필.
 * @param templateId 메시지 템플릿 아이디.
 * @param argumentDic 기타 데이터 딕셔너리.
 * @param completionHandler 완료 핸들러 [error:전송 결과].
 */
+ (void)sendNewGameMessageWithKakaoProfile:(KGKakaoProfile *)kakaoProfile
                                templateId:(NSString *)templateId
                               argumentDic:(NSDictionary *)argumentDic
                         completionHandler:(void (^)(NSError *error))completionHandler;

/**
 * @brief 그룹 채팅으로 카카오 메시지를 전송한다.(링크4.0)
 *
 * @param groupChat 메시지를 수신할 그룹 채팅.
 * @param templateId 템플릿 아이디.
 * @param argumentDic 기타 데이터 딕셔너리.
 * @param completionHandler 완료 핸들러 [error:전송 결과].
 */
+ (void)sendNewGroupChatMessageWithGroupChat:(KGKakaoTalkGroupChat *)groupChat
                               templateId:(NSString *)templateId
                              argumentDic:(NSDictionary *)argumentDic
                        completionHandler:(void(^)(NSError *error))completionHandler;

#pragma mark - Deprecated
/**
 * @deprecated
 */
+ (void)sendInviteMessageWithKakaoProfile:(KGKakaoProfile *)kakaoProfile
							   templateId:(NSString *)templateId
							  argumentDic:(NSDictionary *)argumentDic
						completionHandler:(void (^)(NSError *error))completionHandler DEPRECATED_MSG_ATTRIBUTE("sendInviteMessageWithKakaoProfile is deprecated, please use sendNewInviteMessageWithKakaoProfile instead.");

/**
 * @deprecated
 */
+ (void)sendGameMessageWithKakaoProfile:(KGKakaoProfile *)kakaoProfile
							 templateId:(NSString *)templateId
							argumentDic:(NSDictionary *)argumentDic
					  completionHandler:(void (^)(NSError *error))completionHandler DEPRECATED_MSG_ATTRIBUTE("sendGameMessageWithKakaoProfile is deprecated, please use sendNewGameMessageWithKakaoProfile instead.");

/**
 * @deprecated
 */
+ (void)sendGameMessageWithKakaoProfile:(KGKakaoProfile *)kakaoProfile
							 templateId:(NSString *)templateId
								  image:(UIImage *)image
							argumentDic:(NSDictionary *)argumentDic
					  completionHandler:(void (^)(NSError *error))completionHandler DEPRECATED_MSG_ATTRIBUTE("sendGameMessageWithKakaoProfile is deprecated, please use sendNewGameMessageWithKakaoProfile instead.");

/**
 * @deprecated
 */
+ (void)sendGroupChatMessageWithGroupChat:(KGKakaoTalkGroupChat *)groupChat
							   templateId:(NSString *)templateId
							  argumentDic:(NSDictionary *)argumentDic
						completionHandler:(void(^)(NSError *error))completionHandler DEPRECATED_MSG_ATTRIBUTE("sendGroupChatMessageWithGroupChat is deprecated, please use sendNewGroupChatMessageWithGroupChat instead.");

@end
