//
//  Cell_SettlementDetailAmount.swift
//  VattiCSS
//
//  Created by Jan on 2023/9/25.
//

import UIKit

class Cell_SettlementDetailAmount: UITableViewCell {
    @IBOutlet weak var bgView: UIView!
    @IBOutlet weak var lab_title: UILabel!
    @IBOutlet weak var lab_amount: UILabel!
    
    var callBack: TCRowCallBack?
    override func awakeFromNib() {
        super.awakeFromNib()
        
         let image = UIImage(named: "icon_bg_settlementDetailAmount")
         self.bgView.layer.contents = image?.cgImage
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}


extension Cell_SettlementDetailAmount: TCCell_RowCellUpdateProtocol {

    typealias DataSource = (String,String)
    typealias ConfigModel = TCFormCellConfigModel
    
    func row_update(callBack block: TCRowCallBack?) {
        callBack = block
    }
    
    func row_update(config data: TCFormCellConfigModel) {
      
    }
    
    func row_update(dataSource data: (String,String)) {
        lab_title.text = data.0
        lab_amount.text = "¥" + data.1
    }
    
}
