//
//  WatchVideoTVC.swift
//  MyTatvaCare
//
//  Created by Nirav Ramani on 07/05/25.
//

import UIKit

class WatchVideoTVC: UITableViewCell {
    
    @IBOutlet weak var labelDetails: UILabel!
    @IBOutlet weak var descLabel: UILabel!
    @IBOutlet weak var imageViewGIF: UIImageView!
    
    @IBOutlet var ic_play: UIImageView!
    
    var onPlayVideo: (() -> Void)?
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        ic_play.image = loadImage(named: "ic_play")
        ic_play.isUserInteractionEnabled = true
        descLabel.textColor = CustomColor.shared.gray
        labelDetails.textColor = CustomColor.shared.indigo
        
        
        let tapGesture = UITapGestureRecognizer(target: self, action: #selector(playButtonTapped))
        ic_play.addGestureRecognizer(tapGesture)
        
        descLabel.font = FontManager.font(ofSize: 14, weight: .regular)
        labelDetails.font = FontManager.font(ofSize: 14, weight: .regular)
        
        descLabel.text = "If you are still not able to detect the transmitter then contact our support team"
        labelDetails.text = "Watch this video to ensure a smooth connection journey"
        
        imageViewGIF.loadGif(named: "shrimmer")
    }

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

        // Configure the view for the selected state
    }
    
    @objc func playButtonTapped() {
        onPlayVideo?()
    }

    
}
