AnalysisHeaderViewCell.swift 935 Bytes
//
//  AnalysisHeaderViewCell.swift
//  SwiftWarplyFramework
//
//  Created by Manos Chorianopoulos on 18/7/22.
//

import UIKit

class AnalysisHeaderViewCell: UITableViewCell {

    // attributes
    @IBOutlet weak var itemImage: UIImageView!
    @IBOutlet weak var titleLabel: UILabel!
    @IBOutlet weak var emptyLabel: UILabel!
    
    // lifecycle
    override func awakeFromNib() {
        super.awakeFromNib()
        
        // image
        itemImage.image = UIImage(named: "ic_gift_circle", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
        
        // title
        titleLabel.textColor = UIColor(rgb: 0x435563)
        titleLabel.text = "Αναλυτικά:"
    }
}

extension AnalysisHeaderViewCell {
    func configureCell(isEmpty: Bool) {
        
        if (isEmpty == true) {
            emptyLabel.isHidden = false
        } else {
            emptyLabel.isHidden = true
        }
        
    }
}