//
//  UIViewController+Aliyun.h
//  AliyunIdentityUtils
//
//  Created by nansong.zxc on 2020/7/27.
//  Copyright © 2020 aliyun.com. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

typedef void (^AliyunDismissBlock)(void);
@interface UIViewController ()

- (void)aliyunAlertWithTitle:(NSString *)title
                  titleColor:(UIColor *)titleColor
                     message:(NSString *)message
                messageColor:(UIColor *)messageColor
                confirmTitle:(NSString *)confirmTitle
           confirmTitleColor:(UIColor *)confirmTitleColor
                     handler:(void(^)(void))handler;

- (void)aliyunAlertWithTitle:(NSString *)title
                  titleColor:(UIColor *)titleColor
                     message:(NSString *)message
                messageColor:(UIColor *)messageColor
                 cancelTitle:(NSString *)cancelTitle
            cancelTitleColor:(UIColor *)cancelTitleColor
                confirmTitle:(NSString *)confirmTitle
           confirmTitleColor:(UIColor *)confirmTitleColor
                      cancel:(void(^)(void))cancel 
                     confirm:(void(^)(void))confirm;

// 与上面方法参数完全一致，唯一差别是按钮显示顺序：确定在左、取消在右。
// 仅供 NFC 模块退出弹窗使用，调用方不需要交换 cancelTitle/confirmTitle 的语义参数。
- (void)aliyunAlertConfirmLeftWithTitle:(NSString *)title
                             titleColor:(UIColor *)titleColor
                                message:(NSString *)message
                           messageColor:(UIColor *)messageColor
                            cancelTitle:(NSString *)cancelTitle
                       cancelTitleColor:(UIColor *)cancelTitleColor
                           confirmTitle:(NSString *)confirmTitle
                      confirmTitleColor:(UIColor *)confirmTitleColor
                                 cancel:(void(^)(void))cancel
                                confirm:(void(^)(void))confirm;

- (void)aliyunDismissToController:(UIViewController *) dstViewController completion:(AliyunDismissBlock) complete;

#pragma mark - I18n-Alert-API: 三段式语义化弹窗 API（SDK 1.3.8）
// 使用说明：
// - mainTitle: 主标题，简明短语，无句号，英文 Title Case
// - subTitle:  副标题，完整句子，结尾无句号，英文 Sentence case
// - button:    动词或短语，首字母大写，无标点
// 内部使用默认颜色调用旧 API；RTL 语言下按钮顺序会自动镜像。

- (void)aliyunAlertWithMainTitle:(NSString *)mainTitle
                        subTitle:(NSString *)subTitle
                    confirmTitle:(NSString *)confirmTitle
                         handler:(void(^)(void))handler;

- (void)aliyunAlertWithMainTitle:(NSString *)mainTitle
                        subTitle:(NSString *)subTitle
                     cancelTitle:(NSString *)cancelTitle
                    confirmTitle:(NSString *)confirmTitle
                          cancel:(void(^)(void))cancel
                         confirm:(void(^)(void))confirm;

@end

NS_ASSUME_NONNULL_END
