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

class TSViewTool: UIView {
    

}


let kLightTop = 54.0


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 createNormalSubmitBtn(title:String, action: (() -> Void)? = nil) -> UIButton {
    let btn = UIButton.createButton(title:title,backgroundColor:.themeColor,font: UIFont.font(size: 14,weight: .medium),titleColor:.black,action: action)
    return btn
}

func kCommonColorSlider() -> ColorSlider{
    let previewView = DefaultPreviewView()
    previewView.side = .top
    previewView.animationDuration = 0.2
    previewView.offsetAmount = 0
    previewView.scaleAmounts = [.inactive: 1.0,.activeFixed: 1.2,.active: 1.2]
    let colorSlider = ColorSlider(orientation: .horizontal, previewView: previewView)
    return colorSlider
}
