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

import UIKit

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

    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 = kCornerRadius6
        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(182)
        }
        
        subContentView.addSubview(bigImageView)
        bigImageView.snp.makeConstraints { make in
            make.top.left.right.equalToSuperview()
            make.height.equalTo(182)
        }
    }
}
