//
//  BFStuckPointKitConfig.swift
//  BFStuckPointKit
//
//  Created by SanW on 2021/12/8.
//

import UIKit

public class BFStuckPointKitConfig: NSObject {
    public static let shared = BFStuckPointKitConfig()

    override private init() {
        super.init()
    }

    override public func copy() -> Any {
        return self
    }

    override public func mutableCopy() -> Any {
        return self
    }
}

public func BFStuckPointImage(by name: String) -> UIImage? {
    guard let url = currentBundle()?.url(forResource: "BFStuckPointKit_Resources", withExtension: "bundle") else {
        return nil
    }
    return UIImage(named: name, in: Bundle(url: url), compatibleWith: nil)
}

func currentBundle() -> Bundle? {
    return Bundle(for: BFStuckPointKitConfig.self)
}
