//
//  PWBaseViewController.swift
//  PhysicalWallPaper
//
//  Created by nkl on 2024/11/6.
//

import Combine
import Foundation
import UIKit

class LWBaseViewController: UIViewController {
    
    var cancellabel: [AnyCancellable] = []
    
    override func viewDidLoad() {
        super.viewDidLoad()
        customView()
    }

    func customView() {
        addChildren()
        makeConstarints()
        addNotifaction()
    }

    func addNotifaction() {
    }

    func addChildren() {
    }

    func makeConstarints() {
    }

    @objc func popupCurrentVc() {
        navigationController?.popViewController(animated: true)
    }

    deinit {
        cancellabel.removeAll()
    }
}

class LWBGViewController: LWBaseViewController {
    lazy var bgImageView: UIImageView = .simpleImage(imageName: "view_main_bg")

    override func addChildren() {
        super.addChildren()
        view.addSubview(bgImageView)
    }

    override func makeConstarints() {
        super.makeConstarints()
        bgImageView.snp.makeConstraints { make in
            make.edges.equalToSuperview()
        }
    }
}
