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

class TSPlogTravelTopView: TSBaseView {

    lazy var decorationImageView: UIImageView = {
        let bgImageView = UIImageView.createImageView(image: .plogUpLoadDecoration)
        return bgImageView
    }()
    
    lazy var titleLab: UILabel = {
        let titleLab = UILabel.createLabel(text:"Customized Travel Places".localized,font: .font(name: .PoppinsBoldItalic,size: 28,weight: .bold),textColor:.mainText,numberOfLines: 0)
        return titleLab
    }()
    
    lazy var submitBtn: UIButton = {
        let btn = UIButton.createButton(title: "Front view for best result".localized,backgroundColor: "#FF86EF".uiColor,font: .font(size: 16),titleColor: "#F6F6F6".uiColor,corner: 12)
        btn.isUserInteractionEnabled = false
        btn.contentEdgeInsets = UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 20)
        return btn
    }()

    func setTitle(string:String){
        titleLab.text = string
    }
    
    override func creatUI() {
        contentView.addSubview(decorationImageView)
        decorationImageView.snp.makeConstraints { make in
            make.trailing.equalTo(-16)
            make.width.equalTo(100)
            make.height.equalTo(100)
            make.bottom.equalTo(-21)
        }

        let leading = 16.0
        contentView.addSubview(titleLab)
        titleLab.snp.makeConstraints { make in
            make.trailing.equalTo(-110)
            make.leading.equalTo(leading)
            make.height.equalTo(80)
        }

        contentView.addSubview(submitBtn)
        submitBtn.snp.makeConstraints { make in
            make.bottom.equalTo(0)
            make.leading.equalTo(leading)
            make.height.equalTo(24)
        }
    }
}
