//
//  YHDavidCell0.swift
//  galaxy
//
//  Created by davidhuangA on 2024/1/17.
//  Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//

import UIKit

class YHDavidCell2: UITableViewCell {
    
    static let cellReuseIdentifier = "YHDavidCell2"

    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        setupUI()
    }
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        setupUI()
    }
    
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)
        
    }
    
    lazy var bigImageView: UIImageView = {
        let imagV = UIImageView()
        imagV.contentMode = .scaleToFill
        imagV.image = UIImage(named: "home_cell1_bkg")
        return imagV
    }()

    lazy var subContentView : UIView = {
        let view = UIView()
        view.backgroundColor = UIColor(hex: 0x999999, alpha: 1.0)
        view.layer.cornerRadius = 12
        
        view.layer.backgroundColor = UIColor(red: 1, green: 1, blue: 1, alpha: 1).cgColor
        view.layer.cornerRadius = 10
        view.layer.borderWidth = 0.5
        view.layer.borderColor = UIColor(red: 0.862, green: 0.862, blue: 0.862, alpha: 1).cgColor
        return view
    }()
    
    func setupUI() {
        contentView.backgroundColor = .clear
        backgroundColor = .clear
        
        
        contentView.addSubview(subContentView)
        subContentView.snp.makeConstraints { make in
            make.top.equalToSuperview()
            make.left.equalTo(16)
            make.right.equalTo(-16)
            make.height.equalTo(99)
        }
    }
}
