//
//  BluetoothConnectionViewController.swift
//  react-native-mytatva-rn-sdk
//
//  Created by The Coding Studio on 13/06/25.
//

import UIKit

class BluetoothConnectionViewController: UIViewController {
    
    //MARK: - Variables
    @IBOutlet weak var labelTitle: UILabel!
    @IBOutlet weak var labelDesc: UILabel!
    @IBOutlet var settingImageView: UIImageView!
    @IBOutlet var openBluetoothImageview: UIImageView!
    @IBOutlet var closeButton: UIButton!
    
    //MARK: - Class Methods
    override func viewDidLoad() {
        super.viewDidLoad()
        
        // Do any additional setup after loading the view.
        setupLayout()
    }
    
    func setupLayout() {
        settingImageView.image = loadImage(named: "ic_settings")
        openBluetoothImageview.image = loadImage(named: "ic_bluetooth_button")
        closeButton.setImage(loadImage(named: "ic_close_popup"), for: .normal)
        
        labelTitle.font = FontManager.font(ofSize: 18, weight: .medium)
        labelTitle.textColor = CustomColor.shared.primaryBlack
        
        labelDesc.font = FontManager.font(ofSize: 16, weight: .regular)
        labelDesc.textColor = CustomColor.shared.primaryBlack
      
    }
    

    //MARK: - Action Methods
    @IBAction func buttonCloseTouchUpInside(_ sender: UIButton) {
        dismiss(animated: true)
    }
   
    @IBAction func openBluetoothSetting(_ sender: UIButton) {
        if let settingsURL = URL(string: UIApplication.openSettingsURLString) {
            UIApplication.shared.open(settingsURL)
        }
    }
}
