//
//  INRecorderController.swift
//  Introduce
//
//  Created by 胡志强 on 2021/11/29.
//  首页

import BFMaterialKit
import BFRecordScreenKit
import BFUIKit
import Foundation

class INRecorderController: BFBaseViewController {
    lazy var addVideoBtn: UIButton = {
        let btn = UIButton(type: .custom)
//        btn.setTitle("Add", for: .normal)
        btn.setImage(UIImage(named: "add"), for: .normal)
        btn.addTarget(self, action: #selector(addVideo), for: .touchUpInside)
        return btn
    }()

    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        hiddenNavigation()
    }

    override func viewDidLoad() {
        super.viewDidLoad()
        view.backgroundColor = .black
        view.addSubview(addVideoBtn)
        addVideoBtn.snp.makeConstraints { make in
            make.width.height.equalTo(170)
            make.center.equalToSuperview()
        }

        let l = UILabel()
        l.text = "选择视频，开始讲解"
        l.textColor = .white
        l.font = UIFont.systemFont(ofSize: 16)
        l.textAlignment = .center
        view.addSubview(l)
        l.snp.makeConstraints { make in
            make.top.equalTo(addVideoBtn.snp.bottom)
            make.centerX.equalToSuperview()
            make.width.equalTo(200)
            make.height.equalTo(24)
        }
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    @objc func addVideo() {
        let vc = INPhotoVideosController()
        vc.hidesBottomBarWhenPushed = true
        navigationController?.pushViewController(vc, animated: true)
    }
}
