//
//  MineDetailedTableViewCell.swift
//  MobilePortal
//
//  Created by xiejiangbo on 2019/3/13.
//  Copyright © 2019 yin chen. All rights reserved.
//

import UIKit

class MineDetailedTableViewCell: BaseTableViewCell {
    @IBOutlet weak var collectionView: UICollectionView!
    
    var cellHeight = CGFloat()
    var btnViewWidth = CGFloat()
    var btnViewHeight = CGFloat()
    //每排的 个数
    var cellNum:Double!
    var row:Int!
    var column:Int!
    var xinfo:MineDetailedTableViewCellModel!
    
    var dragCollectionViewDelegate = DragCollectionViewDelegate()
    
    var dataSource = NSMutableArray()
    var layout = UICollectionViewFlowLayout()
    
    var arrayIndex: Int!
//    var isEdite = false
    var indexPath: IndexPath?
    var targetIndexPath: IndexPath?
    
//    lazy var dragingItem: MineCollectionViewCell = {
//        let cell = MineCollectionViewCell(frame: CGRect(x: 0, y: 0, width: self.btnViewWidth, height: self.btnViewHeight))
//        cell.isHidden = true
//        return cell
//    }()
    override func awakeFromNib() {
        super.awakeFromNib()
        self.backgroundColor = UIColor.white
        self.separatorInset=UIEdgeInsetsMake(0, 0, 0, 0)
    }
    
    override func configurateTheCell(_ info: BaseCellModel) {
        xinfo = info as? MineDetailedTableViewCellModel
        self.cellNum = xinfo.cellNum
        cellHeight = self.size.height
        btnViewWidth = (SCREEN_WHIDTH()-10)/CGFloat(cellNum)
        btnViewHeight = btnViewWidth*0.8
        self.dataSource = NSMutableArray()
        self.dataSource = xinfo.detaileArray
        initCollectionView()
    }
    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)
        
    }
    
    override func layoutSubviews() {
        super.layoutSubviews()
    }
}
class MineDetailedTableViewCellModel: BaseCellModel {
    
    var titleValue:String?
    var detaileArray = NSMutableArray()
    var cellNum:Double!
    var block:passParameterBlock!
}
class MineDetailedModel: BaseCellModel {
    var titleValue:String?
    var imageName:String?
    var block:passParameterBlock!
    var isShowBiaoji = true
    var biaojiNum:String?
    var url:String?
}
