//
//  CartPaymentOptionsCell.swift
//  WOKA
//
//  Created by MacBook Pro on 23/07/24.
//

import UIKit

class CartPaymentOptionsCell: UITableViewCell {

    @IBOutlet weak var productTitle: LocalisedElementsLabel!
    @IBOutlet weak var productPrice: LocalisedElementsLabel!
    @IBOutlet weak var productImage: UIImageView!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        self.backgroundColor = .clear
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
    func setData(data : CartListingDM.ResultData){
        self.productTitle.text = data.productName ?? "NA"
        self.productPrice.text = K.ConstantString.rupeeSign + " " + (data.productFinalPrice?.toString() ?? "0.0")
        
        if let imageURL = data.shopImage?.first{
            self.productImage.imageURL(imageURL, color: UIColor.appColor(.TextDarkBlue)!)
        }
    }
}
