//
//  NvAlbumViewController.h
//  SDKDemo
//
//  Created by Meicam on 2018/5/25.
//  Copyright © 2018年 刘东旭. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "NvAlbumItem.h"
@class NvAlbumViewController;

typedef enum : NSUInteger {
    NvSelectAssetAll,
    NvSelectAssetVideo,
    NvSelectAssetImage,
} NvSelectAssetType;

@protocol NvAlbumViewControllerDelegate

@optional
//点击底部按钮触发的回调将所有被选择的assets传出去，自定义按钮的话不会触发此回调
- (void)nvAlbumViewController:(NvAlbumViewController *)albumViewController selectAlbumAssets:(NSMutableArray <NvAlbumAsset *>*)assets;

//每次点击cell或者点击全选取消反选都会掉用，将所有被选择的assets传出去
- (void)nvAlbumViewController:(NvAlbumViewController *)albumViewController didSelectAlbumAssets:(NSMutableArray <NvAlbumAsset *>*)assets;

//点击相册超过最大限制数量，将所有被选择的assets传出去
- (void)nvAlbumViewController:(NvAlbumViewController *)albumViewController selectAlbumAssetsOverMaxCountLimit:(NSMutableArray <NvAlbumAsset *>*)assets;

//点击相册低过最小限制数量，自定义按钮的话不会触发此回调，将所有被选择的assets传出去
- (void)nvAlbumViewController:(NvAlbumViewController *)albumViewController selectAlbumAssetsUnderMinCountLimit:(NSMutableArray <NvAlbumAsset *>*)assets;

//返回按钮触发的回调
- (void)nvAlbumViewControllerCancelClick:(NvAlbumViewController *)albumViewController;

//自定义底部按钮的回调
- (UIView *)nvAlbumViewControllerCustomBottomButton;

@end

@interface NvAlbumViewController : UIViewController

@property (nonatomic, weak) id delegate;

@property (nonatomic, strong, readonly) NSMutableArray <NvAlbumAsset *>*selectAssetSource;

/**
 isOnlyImage和isOnlyVideo互斥，不要同时设置
 */

@property (nonatomic, assign) BOOL isOnlyImage; //是否仅现实图片
@property (nonatomic, assign) BOOL isOnlyVideo; //是否仅为视频
@property (nonatomic, assign) BOOL mutableSelect; //是否多选，默认YES,单选不会有数字标记

@property (nonatomic, assign) NSInteger maxSelectCount; //最多选择的个数
@property (nonatomic, assign) NSInteger minSelectCount; //最少选择的个数

@property (nonatomic, assign) BOOL hiddenSelectAll; //是否隐藏全选按钮
//获取默认底部按钮
@property (nonatomic, strong, readonly) UIButton *customButton;
//自定义下一步按钮的文字
- (void)customSelectAssetButtonText:(NSString *)text;
//一直显示底部自定义试图 默认NO
@property (nonatomic, assign) BOOL alwaysShowCustomBottom;

@end
