//
//  QSLHomeAuthHeaderView.swift
//  QuickSearchLocation
//
//  Created by mac on 2024/4/11.
//

import UIKit

class QSLHomeAuthHeaderView: UIView {
    
    lazy var headerIcon: UIImageView = {
        
        let _headerIcon = UIImageView()
        _headerIcon.image = UIImage(named: "home_icon_header")
        return _headerIcon
    }()
    
    lazy var headerLabel: UILabel = {
        
        let _headerLabel = UILabel()
        _headerLabel.font(12)
        _headerLabel.text = "开启定位权限，记录轨迹"
        _headerLabel.textColor = QSLColor.textColor_333
        return _headerLabel
    }()
    
    lazy var headerArrowIcon: UIImageView = {
        
        let _headerArrowIcon = UIImageView()
        _headerArrowIcon.image = UIImage(named: "public_arrow_right3")
        return _headerArrowIcon
    }()
    
    override init(frame: CGRect) {
        super.init(frame: frame)

        self.effectViewWithAlpha(alpha: 1, size: CGSize(width: QSLConst.qsl_kScreenW - 80, height: 32), style: .light)
        
        addSubview(headerIcon)
        addSubview(headerLabel)
        addSubview(headerArrowIcon)
    }
    
    override func layoutSubviews() {
        super.layoutSubviews()
        
        self.headerIcon.snp.makeConstraints { make in
            make.left.equalTo(8)
            make.centerY.equalTo(snp.centerY)
        }
        
        self.headerLabel.snp.makeConstraints { make in
            make.left.equalTo(self.headerIcon.snp.right).offset(6)
            make.centerY.equalTo(snp.centerY)
        }
        
        self.headerArrowIcon.snp.makeConstraints { make in
            make.right.equalTo(-8)
            make.centerY.equalTo(snp.centerY)
        }
    }

    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}
