//
//  SelectAgeVC.swift
//  WOKA
//
//  Created by Bilal on 26/04/2024.
//

import UIKit

class SelectAgeVC: UIViewController {

    @IBOutlet weak var underAgeView: UIView!
    @IBOutlet weak var aboveAgeView: UIView!
    
    @IBOutlet weak var privacyLabel: UILabel!
    @IBOutlet weak var magicNoLabel: UILabel!
    @IBOutlet weak var yearsLabel: UILabel!
    @IBOutlet weak var iAmUnderLabel: UILabel!
    @IBOutlet weak var iAmAboveLabel: UILabel!
    @IBOutlet weak var underLabel: UILabel!
    @IBOutlet weak var aboveLabel: UILabel!
    @IBOutlet weak var underTextLabel: UILabel!
    @IBOutlet weak var aboveTextLabel: UILabel!
    @IBOutlet weak var numberText: UILabel!
    @IBOutlet weak var wokaLogoTopSpacing: NSLayoutConstraint!
    
    var vm = SelectAgeVM()
    
    // MARK: - LifeCycle

    override func viewDidLoad() {
        super.viewDidLoad()
        vm.vc = self
        vm.initData()
    }

    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        navigationController?.setNavigationBarHidden(false, animated: animated)
    }

    override func viewWillDisappear(_ animated: Bool) {
        super.viewWillDisappear(animated)
        navigationController?.setNavigationBarHidden(true, animated: animated)
        
        if self.isMovingFromParent {
            // Back button was pressed
            PersistentStorage.shared.addOthersCount()
        }
    }

}
