//
//  TSViewTool.swift
//  TSLiveWallpaper
//
//  Created by 100Years on 2024/12/20.
//

class TSViewTool: UIView {
    

}


func createBlurEffectView(style:UIBlurEffect.Style,backgroundColor:UIColor? = nil) -> UIVisualEffectView {
    let blurEffect = UIBlurEffect(style: style)
    let blurEffectView = UIVisualEffectView(effect: blurEffect)
    blurEffectView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
    
    if backgroundColor != nil {
        blurEffectView.backgroundColor = backgroundColor
    }
    
    return blurEffectView
}


func kAddNormalSubmitGradientBg(view:UIView){
    kDelayMainShort {
        view.addGradientBg(colors: ["#E961F6".uiColor.cgColor,"#7E57F4".uiColor.cgColor])
    }
}


func kCreateMoreInfoBtn() -> UIButton{
    let btn = TSUIExpandedTouchButton()
    btn.setImage(UIImage(named: "more_info_white"), for: .normal)
    return btn
}


////常用提交按钮
//func kCreateNormalSubmitBtn(title:String, action: (() -> Void)? = nil) -> UIButton {
//    let btn = UIButton.createButton(title:title,backgroundColor: .black,font: UIFont.font(size: 16,weight: .regular),titleColor:.themeColor,corner: 24,action: action)
//    btn.layer.borderWidth = 1
//    btn.layer.borderColor = UIColor.themeColor.cgColor
//    btn.frame = CGRectMake(0, 0, 200, 48)
//    return btn
//}
////常用取消按钮
//func kCreateNormalCancelBtn(title:String, action: (() -> Void)? = nil) -> UIButton {
//    let btn = UIButton.createButton(title:title,backgroundColor: .fromHex("#FFFFFF", alpha: 0.4),font: UIFont.font(size: 14,weight: .medium),titleColor:.white,corner: 30,action: action)
//    return btn
//}
////常用确定按钮
//func kCreateNormalConfirmBtn(title:String, action: (() -> Void)? = nil) -> UIButton {
//    let btn = UIButton.createButton(title:title,backgroundImage:UIImage(named: "submit_btn_small_bg"),font: UIFont.font(size: 14,weight: .medium),titleColor:.white,corner: 30,action: action)
//    return btn
//}

let kPlaceholderImage = UIImage(named: "placeholderImage")
let kViewBJ = "view_bj"
