//
//  VerifiedPopUpVC.swift
//  WoWonder
//
//  Created by UnikApp on 28/02/23.
//  Copyright © 2023 ScriptSun. All rights reserved.
//

import UIKit

protocol ProfilePicturePopUpVCDelegate {
    func handleProfilePictiureTap(profilePicture: String)
}

class ProfilePicturePopUpVC: UIViewController {
    
    // MARK: - Properties
    
    var delegate: ProfilePicturePopUpVCDelegate!
    
    // MARK: - View Life Cycles

    override func viewDidLoad() {
        super.viewDidLoad()

        self.initialConfig()
    }
    
    // MARK: - Selectors
    
    // All Button Action
    @IBAction func allButtonAction(_ sender: UIButton) {
        self.view.endEditing(true)
        self.dismiss(animated: true) {
            self.delegate.handleProfilePictiureTap(profilePicture: "All")
        }
    }
    
    // Yes Button Action
    @IBAction func yesButtonAction(_ sender: UIButton) {
        self.view.endEditing(true)
        self.dismiss(animated: true) {
            self.delegate.handleProfilePictiureTap(profilePicture: "Yes")
        }
    }
    
    // No Button Action
    @IBAction func noButtonAction(_ sender: UIButton) {
        self.view.endEditing(true)
        self.dismiss(animated: true) {
            self.delegate.handleProfilePictiureTap(profilePicture: "No")
        }
    }
    
    // Close Button Action
    @IBAction func closeButtonCLick(_ sender: UIButton) {
        self.view.endEditing(true)
        self.dismiss(animated: true) {
            self.delegate.handleProfilePictiureTap(profilePicture: "All")
        }
    }
    
    // MARK: - Helper Functions
    
    // Initial Config
    func initialConfig() {
        self.view.backgroundColor = .black.withAlphaComponent(0.4)
    }

}
