//
//  TSGenmojiItemCell.swift
//  AIEmoji
//
//  Created by 100Years on 2025/1/17.
//

class TSGenmojiItemCell: TSBaseCollectionCell {
    
    
    lazy var showImageView: UIImageView = {
        let showImageView = UIImageView.createImageView(imageName:"")
        showImageView.backgroundColor = .gray
        showImageView.layer.cornerRadius = 18
        return showImageView
    }()
    
    override func creatUI() {
        contentView.addSubview(showImageView)
        showImageView.snp.makeConstraints { make in
            make.top.equalTo(0)
            make.leading.equalTo(0)
            make.trailing.bottom.equalTo(0)
        }
    }
    
    
    override func renderView(with object: Any?, component: CollectionViewComponent, attributes: [String : Any]?) {
        super.renderView(with: object, component: component, attributes: attributes)
        
        if let itemModel = object as? TSGenmojiCoLItemModel{
            showImageView.setAsyncImage(urlString: itemModel.dataModel.response.resultUrl)
        }
    }
}
