//
//  Cell_OrderCreatItemSelecte.swift
//  VattiCSS
//
//  Created by Jan on 2023/8/29.
//

import UIKit

class Cell_OrderCreatItemSelecte: UITableViewCell {
    //产品型号
    @IBOutlet weak var classSelectBtn: UIButton!
    @IBOutlet weak var classNameLb: UILabel!
    
    @IBOutlet weak var lab_title: UILabel!
    
    var callBack: TCRowCallBack?
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        classNameLb.numberOfLines = 2
        lab_title.text = "产品型号".languageString()+":"
    }

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

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



extension Cell_OrderCreatItemSelecte: TCCell_RowCellUpdateProtocol {

    typealias DataSource = (String)
    typealias ConfigModel = TCFormCellConfigModel
    
    func row_update(callBack block: TCRowCallBack?) {
        callBack = block
    }
    
    func row_update(config data: TCFormCellConfigModel) {
      
    }
    
    func row_update(dataSource data: (String)) {
        let itemname = data
        
        classNameLb.text = itemname == "" ? "请选择".languageString() : itemname
    }
    
}
