//
//  VideoTVC.swift
//  MyTatvaCare
//
//  Created by Nirav Ramani on 08/05/25.
//

import UIKit

class VideoTVC: UITableViewCell {
    
    @IBOutlet weak var imageViewBackground: UIImageView!
    @IBOutlet weak var imageViewPlay: UIImageView!
    @IBOutlet weak var buttonPlay: UIButton!
    
    var onPlayVideo: (() -> Void)?
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        imageViewPlay.loadGif(named: "play")
        imageViewBackground.contentMode = .scaleAspectFill
        buttonPlay.addTarget(self, action: #selector(playButtonTapped), for: .touchUpInside)
    }

    @objc func playButtonTapped() {
        onPlayVideo?()
    }
}
