//
//  HomeExploreCell.swift
//  WOKA
//
//  Created by Bilal on 24/05/2024.
//

import UIKit

class HomeExploreCell: UICollectionViewCell {

    @IBOutlet weak var cellBtn: UIImageView!
    @IBOutlet weak var cellLabel: LocalisedElementsLabel!
    @IBOutlet weak var mainView: UIView!
    
    override func awakeFromNib() {
        super.awakeFromNib()
//        self.addTapGesture { [weak self] in
//            guard let self else{return}
//            btnTap()
//        }
    }
    

    func btnTap(){
        UIView.animate(withDuration: 0.1, animations: {
            self.mainView.transform = CGAffineTransform(scaleX: 0.9, y: 0.9)
        }) { _ in
            UIView.animate(withDuration: 0.1) {
                self.mainView.transform = .identity
            }
        }
    }
    
    func setData(data : Theme2Struct){
        self.cellBtn.image = UIImage(named: data.imageName)
        self.cellLabel.text = data.text.localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
    }
}
