//
//  QSLContactFailCell.swift
//  QuickSearchLocation
//
//  Created by Destiny on 2024/12/12.
//

import UIKit

class QSLContactFailCell: UITableViewCell {
    
    lazy var failIcon: UIImageView = {
       
        let imageView = UIImageView()
        imageView.image = UIImage(named: "contact_fail_icon")
        return imageView
    }()
    
    lazy var contentLabel: UILabel = {
       
        let label = UILabel()
        label.text("【儿子】138 8888 8888")
        label.font(14)
        label.textColor = .hexStringColor(hexString: "#404040")
        return label
    }()
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        self.backgroundColor = QSLColor.backGroundColor
        
        self.addSubview(failIcon)
        failIcon.snp.makeConstraints { make in
            make.size.equalTo(CGSize(width: 16.rpx, height: 16.rpx))
            make.centerY.equalToSuperview()
            make.left.equalTo(60.rpx)
        }
        
        self.addSubview(contentLabel)
        contentLabel.snp.makeConstraints { make in
            make.centerY.equalToSuperview()
            make.left.equalTo(failIcon.snp.right).offset(5.rpx)
        }
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func config(phone: String) {
        
        self.contentLabel.text("【用户】\(phone)")
    }
}
