//
//  Cell_FinishPartDelete.swift
//  VattiCSS
//
//  Created by Jan on 2023/9/11.
//

import UIKit

class Cell_FinishPartDelete: UITableViewCell {

    @IBOutlet weak var bgView: UIView!
    @IBOutlet weak var btn_delete: UIButton!
    var callBack: TCRowCallBack?
    override func awakeFromNib() {
        super.awakeFromNib()
        btn_delete.imageEdgeInsets = UIEdgeInsets(top: 0, left: -8, bottom: 0, right: 0)
        bgView.makeLayerRadius(value: 5,type: [.layerMinXMaxYCorner,.layerMaxXMaxYCorner])
        
        btn_delete.setTitle("删除".languageString(), for: .normal)
    }

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

        // Configure the view for the selected state
    }
    
    @IBAction func deleteAction(_ sender: UIButton) {
        callBack?(0)
    }
    
}


extension Cell_FinishPartDelete: TCCell_RowCellUpdateProtocol {

    typealias DataSource = (String,String)
    typealias ConfigModel = TCFormCellConfigModel
    
    func row_update(config data: TCFormCellConfigModel) {
      
    }
    
    func row_update(dataSource data: (String,String)) {
      
    }
    
    func row_update(callBack block: TCRowCallBack?) {
        callBack = block
    }
    
}

