//
//  OldPartsListButtonsCell.swift
//  VattiCSS
//
//  Created by WZR on 2023/10/7.
//

import UIKit

class OldPartsListButtonsCell: UITableViewCell {
    @IBOutlet weak var bgView: UIView!
    @IBOutlet weak var btn_1: UIButton!
    
    var callBack: TCRowCallBack?
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        btn_1.cd.text("退回".languageString())
    }

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

        // Configure the view for the selected state
    }
    
    override func draw(_ rect: CGRect) {
        super.draw(rect)
        bgView.makeRadius(value: 8, type: [.topLeft, .topRight])
    }
    
    @IBAction func clickButton(_ sender: UIButton) {
        callBack?(sender.tag)
    }
}
extension OldPartsListButtonsCell: TCCell_RowCellUpdateProtocol {
    typealias DataSource = String
    typealias ConfigModel = Any
    
    func row_update(dataSource data: DataSource) {
        
    }
    
    func row_update(config data: ConfigModel) {
    }
    
    func row_update(callBack block: TCRowCallBack?) {
        self.callBack = block
    }
}
