 
 extension NSAttributedString {
     
-    func withInherited(font: UIFont, textAlignment: NSTextAlignment) -> NSAttributedString {
+    fileprivate func withInherited(font: UIFont, textAlignment: NSTextAlignment) -> NSAttributedString {
         
         let paragraphStyle = NSMutableParagraphStyle()
         paragraphStyle.alignment = textAlignment

    
import UIKit

public class AttributedLabel: UIView {
    
    //MARK: - private properties
    private let label = UILabel()
    private var detectionAreaButtons = [DetectionAreaButton]()
    
    //MARK: - public properties
    public var onClick: ((AttributedLabel, Detection)->Void)?
    
    public var isEnabled: Bool {
        set {
            detectionAreaButtons.forEach { $0.isUserInteractionEnabled = newValue  }
            state.isEnabled = newValue

        }
    }
    
    open var attributedText: AttributedText? {
        set {
            state.attributedTextAndString = newValue.map { ($0, $0.attributedString) }
            setNeedsLayout()
