//
//  TSRecollectionNullView.swift
//  KittensTravelNotes
//
//  Created by 100Years on 2025/7/7.
//


class TSRecollectionNullView: TSBaseView {

    var clickBlock:(()->Void)?
    
    lazy var imageView: UIImageView = {
        return UIImageView.createImageView(image: .recollectionNull)
    }()
    
    lazy var titleLabel: UILabel = {
        let titleLabel = UILabel.createLabel(text:"Create Moments Now！".localized ,font:.font(name:.PoppinsBoldItalic,size: 16.0),textColor: .mainText,textAlignment: .center,numberOfLines: 0)
        return titleLabel
    }()
    
    lazy var infoLabel: UILabel = {
        let titleLabel = UILabel.createLabel(text:"Choose a place to take your cat to travel now,and save the traveling photo in your gallery！".localized ,font:.font(size: 14.0),textColor: .lesserText,textAlignment: .center,numberOfLines: 0)
        return titleLabel
    }()
    
    
    lazy var creatBtn: UIButton = {
        let creatBtn = kCreateNormalSubmitBtn(title: "Create Now".localized){ [weak self]  in
            guard let self = self else { return }
            clickBlock?()
        }
        return creatBtn
    }()

    override func creatUI() {
        
        self.frame = CGRectMake(0, 0, k_ScreenWidth, k_ScreenHeight - k_Nav_Height)
        
        contentView.addSubview(imageView)
        imageView.snp.makeConstraints { make in
            make.top.equalTo(162)
            make.centerX.equalToSuperview()
            make.width.height.equalTo(120)
        }

        contentView.addSubview(titleLabel)
        titleLabel.snp.makeConstraints { make in
            make.top.equalTo(imageView.snp.bottom).offset(12)
            make.leading.equalTo(26)
            make.trailing.equalTo(-26)
        }
        
        contentView.addSubview(infoLabel)
        infoLabel.snp.makeConstraints { make in
            make.top.equalTo(titleLabel.snp.bottom).offset(12)
            make.leading.equalTo(26)
            make.trailing.equalTo(-26)
        }
        
        contentView.addSubview(creatBtn)
        creatBtn.snp.makeConstraints { make in
            make.top.equalTo(infoLabel.snp.bottom).offset(32)
            make.centerX.equalToSuperview()
            make.width.greaterThanOrEqualTo(200)
            make.height.equalTo(56)
        }

    }
    
}
