 //
 
 import Foundation
+import ObjectMapper
 
 public extension IntegerLiteralType {
     

        UserDefaults.standard.setValue(false, forKey: "_UIConstraintBasedLayoutLogUnsatisfiable")
    }
    
}

public extension Bundle {

        return CGFloat(self)
    }
    
    public var formatted: String {
        let numberFormatter = NumberFormatter()
        numberFormatter.numberStyle = .decimal
        return numberFormatter.string(for: self) ?? String(self)
    }
    
    public func formatted(fractionDigits: Int = 2) -> String {
        let numberFormatter = NumberFormatter()
        numberFormatter.numberStyle = .decimal
        numberFormatter.minimumFractionDigits = 1
        numberFormatter.maximumFractionDigits = fractionDigits
        return numberFormatter.string(for: self) ?? String(self)
    }
}

public extension FloatLiteralType {
    
    public var f: CGFloat {
        return CGFloat(self)
    }
    
    public var formatted: String {
        let numberFormatter = NumberFormatter()
        numberFormatter.numberStyle = .decimal
        return numberFormatter.string(for: self) ?? String(self)
    }
    
    public func formatted(fractionDigits: Int = 2) -> String {
        let numberFormatter = NumberFormatter()
        numberFormatter.numberStyle = .decimal
        numberFormatter.minimumFractionDigits = 1
        numberFormatter.maximumFractionDigits = fractionDigits
        return numberFormatter.string(for: self) ?? String(self)
    }
    
}
