//
//  ShopProductsCell.swift
//  WOKA
//
//  Created by MacBook Pro on 22/07/24.
//

import UIKit

class ShopProductsCell: UICollectionViewCell {

    @IBOutlet weak var productImage: UIImageView!
    @IBOutlet weak var productTitle: UILabel!
    @IBOutlet weak var productPrice: UILabel!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        productTitle.font = FontCustom.shareInstance.customFont(fontName: .Exo2_Regular, size: 13)
        productPrice.font = FontCustom.shareInstance.customFont(fontName: .Exo2_Regular, size: 13)
        // Initialization code
    }
    
    func setData(data : ShopProductsListingDM.ResultData){
        if data.subCategoryMasterID == 12{
            self.productTitle.text = data.shopMasterDetail?.productNameEnglish
        }else{
            self.productTitle.text = data.shopMasterDetail?.productNameHindi
        }
//        self.productTitle.text = data.productName
        self.productPrice.text = data.productPrice
        
        if let url = data.shopImage?.first{
            self.productImage.imageURL(url, color: .black)
        }
    }

}
