//
//  DFTTSDK.h
//  DFTTFramework
//
//  Created by 路鹏 on 2017/4/19.
//  Copyright © 2017年 路鹏. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "TTNewsView.h"
#import "TTNumberNewsListView.h"
#import "TTAtlasView.h"
#import "TTNewsListView.h"
#import "TTVideoView.h"
#import "TTSpecailNewsDetailView.h"
#import "TTNewsDetailView.h"
#import "TTAtlasDetailView.h"
#import "TTNewsWebDetailView.h"
#import "TTVideoDetailView.h"
#import "TTSearchView.h"

#import "TTNewsDetailController.h"
/** 字体大小*/
typedef NS_ENUM(NSInteger, TTNewsTextFont) {
    TTNewsTextFontFontSmall = 0,          //小
    TTNewsTextFontNormal,                 //中
    TTNewsTextFontBig,                    //大
    TTNewsTextFontSuperBig,               //超大
};

@protocol DFTTPushDelegate<NSObject>
- (void)receivePushNewsModel:(id)model isBackground:(BOOL)isBackground;

@end

typedef void(^TTPushBlock)(NSDictionary *detailDic);

@interface DFTTSDK : NSObject
@property (nonatomic, weak) id<DFTTPushDelegate> pushDelegate;
@property (nonatomic, copy) TTPushBlock TTPushBlock;

/*!@brief 初始化单例对象
 *
 * @return dfttsdk对象
 */
+(DFTTSDK *)shareManager;


/** 设置新闻标题和新闻内页新闻内容文字大小*/
- (void)setTextFontSize:(TTNewsTextFont)fontSize;

/** 获取当前字号*/
- (TTNewsTextFont)getTextFontSize;

#pragma mark 新闻
/*!@brief 新闻列表页面
 * @param newscfg 新闻数据显示模式
 * @param frame 新闻列表页面的frame
 */
-(TTNewsView *)setupNewsListViewWithWith:(TTNewscfg *)newscfg WithFrame:(CGRect)frame withSuccessBlock:(void(^)(id responese))successBlock withFailBlock:(void(^)(id failInfo))failBlock;

/*!@brief 固定条数新闻列表页面
 * @param newscfg 新闻数据显示模式
 * @param frame 新闻列表页面的frame
 */
-(TTNumberNewsListView *)setupNumberNewsListViewWithWith:(TTNumberNewsCfg *)newscfg WithFrame:(CGRect)frame withSuccessBlock:(void(^)(id responese))successBlock withFailBlock:(void(^)(id failInfo))failBlock;

/*!@brief 图集新闻列表页面
 * @param newscfg 新闻数据显示模式
 * @param frame 新闻列表页面的frame
 */
-(TTAtlasView *)setupAtlasListViewWithWith:(TTNewscfg *)newscfg WithFrame:(CGRect)frame withSuccessBlock:(void(^)(id responese))successBlock withFailBlock:(void(^)(id failInfo))failBlock;

/*!@brief 固定分类新闻列表页面
 * @param newscfg 新闻数据显示模式
* @param type 新闻分类默认‘toutiao’
 * @param frame 新闻列表页面的frame
 */
-(TTNewsListView *)setupTypeListViewWithWith:(TTNewscfg *)newscfg withNewsTypeModel:(TTSortScrollTitleModel *)type WithFrame:(CGRect)frame withSuccessBlock:(void(^)(id responese))successBlock withFailBlock:(void(^)(id failInfo))failBlock;


#pragma mark 视频
/*!@brief 视频列表页面
 * @param newscfg 新闻数据显示模式
 * @param frame 新闻列表页面的frame
 */
-(TTVideoView *)setupVideoListViewWithWith:(TTVideocfg *)newscfg WithFrame:(CGRect)frame withSuccessBlock:(void(^)(id responese))successBlock withFailBlock:(void(^)(id failInfo))failBlock;


#pragma mark 内页
/*!@brief 专题内页
 * @param newscfg 专题内页配置
 * @param frame 页面的frame
 * @param model 传过来model
 */
- (TTSpecailNewsDetailView *)setupSpecialNewsDetailViewWith:(TTSpecialNewsDetailCfg *)newscfg withNewsTypeModel:(TTNewsListModel *)model WithFrame:(CGRect)frame withSuccessBlock:(void(^)(id responese))successBlock withFailBlock:(void(^)(id failInfo))failBlock;

/*!@brief 普通新闻内页
 * @param newscfg 内页配置
 * @param frame 页面的frame
 * @param model 传过来model
 */
- (TTNewsDetailView *)setupNewsDetailViewWith:(TTNewsDetailCfg *)newscfg withNewsTypeModel:(TTNewsListModel *)model WithFrame:(CGRect)frame withSuccessBlock:(void(^)(id responese))successBlock withFailBlock:(void(^)(id failInfo))failBlock;

/*!@brief 图集内页
 * @param frame 页面的frame
 * @param model 传过来model
 */
- (TTAtlasDetailView *)setupAtlasDetailViewWithNewsTypeModel:(TTNewsListModel *)model WithFrame:(CGRect)frame withSuccessBlock:(void(^)(id responese))successBlock withFailBlock:(void(^)(id failInfo))failBlock;

/*!@brief web内页
 * @param newscfg 内页配置
 * @param frame 页面的frame
 * @param model 传过来model
 */
- (TTNewsWebDetailView *)setupNewsWebDetailViewWith:(TTNewsWebDetailcfg *)newscfg withNewsTypeModel:(TTNewsListModel *)model WithFrame:(CGRect)frame withSuccessBlock:(void(^)(id responese))successBlock withFailBlock:(void(^)(id failInfo))failBlock;

/*!@brief 视频内页
 * @param newscfg 内页配置
 * @param frame 页面的frame
 * @param model 传过来model
 */
- (TTVideoDetailView *)setupTTVideoDetailViewWith:(TTVideoDetailCfg *)newscfg withNewsTypeModel:(TTNewsListModel *)model WithFrame:(CGRect)frame withSuccessBlock:(void(^)(id responese))successBlock withFailBlock:(void(^)(id failInfo))failBlock;


/*!@brief 搜索页面
 * @param frame 页面的frame
 */
- (TTSearchView *)setupTTSearchViewWithFrame:(CGRect)frame withNewsType:(TTNewscfg *)newscfg withSuccessBlock:(void(^)(id responese))successBlock withFailBlock:(void(^)(id failInfo))failBlock;
/*!@breif 
 * @param heigth progress heigth
 */
#pragma mark - push log
- (void)turnOffLog:(BOOL)isTurnOff;
- (void)installLog;
@end
