//
//  QSBookDetailProtocols.swift
//  zhuishushenqi
//
//  Created Nory Cao on 2017/4/13.
//  Copyright © 2017年 QS. All rights reserved.
//
//  Template generated by Juanpe Catalán @JuanpeCMiOS
//

import Foundation
import UIKit

//MARK: Wireframe -
protocol QSBookDetailWireframeProtocol: class {
    func presentReading(model:[ResourceModel],booDetail:BookDetail)
    func presentComment(model:BookComment)
//    func presentComment(id:String)
    func presentTopic(model:QSBookList)
    func presentSelf(model:Book)
    func presentCommunity(model:BookDetail)
    func presentInterestedView(recList:[Book])
}
//MARK: Presenter -
protocol QSBookDetailPresenterProtocol: class {
    func viewDidLoad(id:String)
    func didClickReadingBtn(model:BookDetail,select:Bool)
    func didClickPersueBtn(model:BookDetail,select:Bool)
    func didClickCacheAll()
    func didSelectRow(indexPath:IndexPath)
    func didClickRecBtn(btn:UIView)
}

//MARK: Interactor -
protocol QSBookDetailInteractorProtocol: class {
    func requestData(id:String)
    func requestAllChapters(withUrl url:String,param:[String:Any])
    func requestRecommend()
    func requestRecList()
    func showTopic(index:Int)
    func showBookDetail(tag:Int)
    func showCommunity()
}

//MARK: Output -
protocol QSBookDetailInteractorOutputProtocol: class {
    func fetchBookSuccess(bookDetail:BookDetail,ranks:[BookComment])
    func fetchRankFailed()
    func fetchContent(show:Bool)
    func fetchAllChapterSuccess(bookDetail:BookDetail,res:[ResourceModel])
    func fetchAllChapterFailed()
    func fetchRecommendSuccess(books:[Book])
    func fetchRecommendFailed()
    func fetchRecBookSuccess(books:[QSBookList])
    func fetchRecBookFailed()
    func showTopic(model:QSBookList)
    func showBookDetail(model:Book)
    func showCommunity(model:BookDetail)
    func showInterestedView(recList:[Book])
//    func fetchMayIntrestedSuccess()
}


//MARK: View -
protocol QSBookDetailViewProtocol: IndicatableView {

  var presenter: QSBookDetailPresenterProtocol?  { get set }
    func showContent(show:Bool)
    func showResult(bookDetail:BookDetail,comment:[BookComment])
    func showRecommend(list:[Book])
    func showRecBookList(list:[QSBookList])
}
