import UIKit

protocol SearchRandomTableCellDelegate {
    func handleFollowButtonTap(_ sender: UIButton,indexPath: IndexPath)
}

class SearchRandomTableCell: UITableViewCell {
    
    @IBOutlet weak var userNameLabel: UILabel!
    @IBOutlet weak var profileImage: UIImageView!
    @IBOutlet weak var aboutLabel: UILabel!
    @IBOutlet weak var verifiedImage: UIImageView!
    @IBOutlet weak var followButton: UIButton!
    
    var indexPath = IndexPath()
    var delegate: SearchRandomTableCellDelegate?
    
    override func awakeFromNib() {
        super.awakeFromNib()

        // Initialization code
        
        self.initialConfig()
    }
    
    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)
        
    }
    
    // Initial Config
    func initialConfig() {
        self.selectionStyle = .none
    }
    
    @IBAction func followButtonAction(_ sender: UIButton) {
        self.delegate?.handleFollowButtonTap(sender, indexPath: self.indexPath)
    }
  
}
