//
//  YHAdopterCardExplainTableViewCell.swift
//  galaxy
//
//  Created by EDY on 2024/8/20.
//  Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//

import UIKit

class YHAdopterCardExplainTableViewCell: UITableViewCell {
    var titleLabel: UILabel!
    var subTitleLabel: UILabel!
    var alertLabel: 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
    }

    required init?(coder: NSCoder) {
        super.init(coder: coder)
    }
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        selectionStyle = .none
        setupUI()
    }
    
    func setupUI() {
        backgroundColor = .clear

        titleLabel = {
            let label = UILabel()
            label.font = UIFont.PFSC_R(ofSize: 17)
            label.textColor = UIColor.mainTextColor
            label.text = "中国身份证"
            return label
        }()
        contentView.addSubview(titleLabel)
        titleLabel.snp.makeConstraints { make in
            make.left.equalTo(18)
            make.top.equalTo(34)
            make.height.equalTo(24)
        }
        
        subTitleLabel = {
            let label = UILabel()
            label.text = "已完成"
            label.font = UIFont.PFSC_R(ofSize: 10)
            label.textColor = UIColor(hex: 0x3cc694)
            label.backgroundColor = UIColor(hex: 0xf0fbf7)
            //带上传
//            label.textColor = UIColor.brandMainColor
//            label.backgroundColor = UIColor(hex: 0xf0f4fb)
            //审核中
//            label.textColor = UIColor(hex: 0xff8000)
//            label.backgroundColor = UIColor(hex: 0xfff5eb)
            //已驳回
//            label.textColor = UIColor(hex: 0xf81d22)
//            label.backgroundColor = UIColor(hex: 0xfff2f2)
            return label
        }()
        contentView.addSubview(subTitleLabel)
        subTitleLabel.snp.makeConstraints { make in
            make.left.equalTo(titleLabel.snp.right).offset(4)
            make.width.equalTo(38)
            make.height.equalTo(16)
            make.centerY.equalTo(titleLabel.snp.centerY)
        }
        
        alertLabel = {
            let label = UILabel()
//            label.text = "存款证明有效期为3个月，并且存款金额为每个成员（包括额外新增受养人）最低为12万"
            label.font = UIFont.PFSC_R(ofSize: 14)
            label.textColor = UIColor.mainTextColor50
            label.numberOfLines = 0
            return label
        }()
        contentView.addSubview(alertLabel)
        alertLabel.snp.makeConstraints { make in
            make.left.equalTo(18)
            make.top.equalTo(64)
            make.right.equalTo(-18)
        }
        
    }

}
