//
//  ServiceFaultSolutionCell.swift
//  VattiCSS
//
//  Created by WZR on 2023/10/13.
//

import UIKit

class ServiceFaultSolutionCell: UITableViewCell {
    @IBOutlet weak var tipView: UIView!
    @IBOutlet weak var titleLab: UILabel!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

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

        // Configure the view for the selected state
    }
    
}
extension ServiceFaultSolutionCell: TCCell_RowCellUpdateProtocol {
    typealias DataSource = (String, Int)
    typealias ConfigModel = Any
    
    func row_update(dataSource data: DataSource) {
        titleLab.cd.text(data.0)
        //蓝，橙，绿排色
        let falg = data.1+3
        
        if falg % 3 == 0 {
            //蓝色
            tipView.backgroundColor = Config.color.hex("248BF4")
        }else if falg % 3 == 1 {
            //橙色
            tipView.backgroundColor = Config.color.hex("FF9500")
        }else{
            //绿色
            tipView.backgroundColor = Config.color.hex("009DA1")
        }
    }
    
    func row_update(config data: ConfigModel) {
    }
}
