//Created  on 2019/7/13 by  LCD:https://github.com/liucaide .

/***** 模块文档 *****
 *
 */




import UIKit
import CaamDau


extension Cell_LeftRight {
    public struct Model {
        public let font:UIFont?
        public let color:UIColor?
    }
}


public class Cell_LeftRight: UITableViewCell {
    public static let bundle:String = "UtilityViews"
    @IBOutlet weak var stack_bg: UIStackView!
    @IBOutlet weak var stack_left: UIStackView!
    @IBOutlet weak var stack_right: UIStackView!
    @IBOutlet weak var lab_left0: UILabel!
    @IBOutlet weak var lab_left1: UILabel!
    @IBOutlet weak var lab_left2: UILabel!
    
    @IBOutlet weak var lab_right0: UILabel!
    @IBOutlet weak var lab_right1: UILabel!
    @IBOutlet weak var lab_right2: UILabel!
    
    override public func awakeFromNib() {
        super.awakeFromNib()
        
    }
}

extension Cell_LeftRight: CD_RowCellUpdateProtocol {
    public typealias DataSource = (String?,String?,String?,String?,String?,String?)
    
    public typealias ConfigModel = ((l:UIStackView.Alignment?, r:UIStackView.Alignment?)?, (l1:Model?,l2:Model?,l3:Model?,r1:Model?,r2:Model?,r3:Model?)?)
    public func row_update(config data: ((l: UIStackView.Alignment?, r: UIStackView.Alignment?)?, (l1: Cell_LeftRight.Model?, l2: Cell_LeftRight.Model?, l3: Cell_LeftRight.Model?, r1: Cell_LeftRight.Model?, r2: Cell_LeftRight.Model?, r3: Cell_LeftRight.Model?)?)) {
        
    }
    public func row_update(dataSource data: (String?, String?, String?, String?, String?, String?)) {
        lab_left0.cd
            .isHidden(data.0==nil)
            .text(data.0)
        
        lab_left1.cd
            .isHidden(data.1==nil)
            .text(data.1)
        
        lab_left2.cd
            .isHidden(data.2==nil)
            .text(data.2)
        
        lab_right0.cd
            .isHidden(data.3==nil)
            .text(data.3)
        
        lab_right1.cd
            .isHidden(data.4==nil)
            .text(data.4)
        
        lab_right2.cd
            .isHidden(data.5==nil)
            .text(data.5)
    }
}
