//
//  ChatBgCollectionCell.swift
//  Visual_Novel_iOS
//
//  Created by mh on 2025/10/28.
//

import UIKit

class ChatBgCollectionCell: UICollectionViewCell {
    
    lazy var containView: UIView = {
        let v = UIView()
        v.backgroundColor = UIColor(hex: "#F3F4FF")
        v.cornerRadius = 10.0
        v.clipsToBounds = true
        return v
    }()
    
    lazy var contentImgView: UIImageView = {
        let imgView = UIImageView()
        return imgView
    }()
    
    lazy var selectedImgView: UIImageView = {
        let imgview = UIImageView(image: UIImage(named: "rolel_setting_selected"))
        return imgview
    }()
    
    lazy var deleteImgView: UIImageView = {
        let imgView = UIImageView(image: UIImage(named: "chat_setting_bg_delete"))
        return imgView
    }()
    
    lazy var addImgView: UIImageView = {
        let imgView = UIImageView(image: UIImage(named: "chat_setting_add_bg"))
        return imgView
    }()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        setupViews()
        setupData()
        setupEvent()
    }

    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func setupViews() {
        contentView.addSubview(containView)
        containView.addSubview(contentImgView)
        containView.addSubview(addImgView)
        containView.addSubview(selectedImgView)
        containView.addSubview(deleteImgView)
        
        containView.snp.makeConstraints { make in
            make.edges.equalToSuperview()
        }
        
        contentImgView.snp.makeConstraints { make in
            make.edges.equalToSuperview().inset(2)
        }
        
        addImgView.snp.makeConstraints { make in
            make.centerX.centerY.equalToSuperview()
        }
        
        selectedImgView.snp.makeConstraints { make in
            make.right.bottom.equalToSuperview().inset(0)
        }
        
        deleteImgView.snp.makeConstraints { make in
            make.centerX.equalToSuperview()
            make.bottom.equalToSuperview().inset(7)
        }
    }
    
    func setupData() {}
    
    func setupEvent() {}
    
}
