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

import UIKit

class MineMoreTableViewCell: BaseTableViewCell {

    @IBOutlet weak var collectionView: UICollectionView!
    var collectionViewDelegate = HomeMoreTwoTableViewCellCollectionViewDelegate()
    var layout = UICollectionViewFlowLayout()
    var cellNum:Double!
    var btnViewWidth = CGFloat()
    var btnViewHeight = CGFloat()
    var dataSource = NSMutableArray()
    //var editStatusType:EditStatusType = .FinishEditing
    var arrayIndex: Int!
    
    var indexPath: IndexPath?
    var targetIndexPath: IndexPath?
    var xinfo = MineMoreTableViewCellModel()
    var editStatusType:EditStatusType = .StartEditing {
        didSet {
            self.collectionViewDelegate.editStatusType = self.editStatusType
            self.collectionView.delegate = self.collectionViewDelegate
            self.collectionView.reloadData()
        }
    }
    var operationType:OperationType = .DeleteType {
        didSet {
            self.collectionViewDelegate.operationType = self.operationType
            self.collectionView.delegate = self.collectionViewDelegate
            self.collectionView.reloadData()
        }
    }
    lazy var dragingItem: MineMoreCollectionViewCell = {
        let cell = MineMoreCollectionViewCell(frame: CGRect(x: 0, y: 0, width: self.btnViewWidth, height: self.btnViewHeight))
        cell.isHidden = true
        return cell
    }()
    override func awakeFromNib() {
        super.awakeFromNib()
        self.separatorInset=UIEdgeInsetsMake(0, WHIDTH_RATIO(), 0, 0)
    }
    
    override func configurateTheCell(_ info: BaseCellModel) {
        xinfo = info as! MineMoreTableViewCellModel
        initDragCollectionView()
    }
    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)
        
        
    }

}
class MineMoreTableViewCellModel: BaseCellModel {
    var vcTitle:String?
    var collcetionViewSectionModellArray = NSMutableArray()
    var collcetionViewHeaderArray = NSMutableArray()
    var height = CGFloat()
    var block:passTwoParameterBlock!
    var changeBlock:passParameterBlock!
}
class MineMoreTwoTableViewCellModel: BaseCellModel {
    var vcTitle:String?
    var collcetionViewSectionModellArray = NSMutableArray()
}

