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

import UIKit

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

    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 headImage: UIImageView = {
        let imagV = UIImageView()
        imagV.contentMode = .scaleAspectFill
        imagV.image = UIImage(named: "home_cell0_head_icon")
        return imagV
    }()
    
    
    lazy var contentImage: UIImageView = {
        let imagV = UIImageView()
        imagV.contentMode = .scaleAspectFill
        imagV.image = UIImage(named: "home_cell0_content_icon")
        return imagV
    }()
    
    func setupUI() {
        contentView.backgroundColor = .clear
        backgroundColor = .clear
        contentView.addSubview(headImage)
        contentView.addSubview(contentImage)
        
        contentImage.snp.makeConstraints { make in
            make.top.equalToSuperview().offset(12)
            make.right.equalToSuperview().offset(-16)
            make.width.equalTo(242)
            make.height.equalTo(97)
        }
        
        headImage.snp.makeConstraints { make in
            make.right.equalTo(contentImage.snp.left)
            make.width.equalTo(88)
            make.height.equalTo(122)
            make.bottom.equalToSuperview()
        }
    }
}
