     public override func copy(_ sender: Any?) {
         UIPasteboard.general.string = titleLabel?.text
     }
-
-    static let centeredParagraphStyle: NSParagraphStyle = {
-        let style = NSMutableParagraphStyle()
-        style.setParagraphStyle(.default)
-        style.alignment = .center
-        return style
-    }()
-    
-    static let normalAttributes = [
-        NSAttributedStringKey.font: UIFont.boldSystemFont(ofSize: 17),
-        NSAttributedStringKey.foregroundColor: UIColor.black,
-        NSAttributedStringKey.paragraphStyle: centeredParagraphStyle
-    ]
-    
-    static let highlightedAttributes = [
-        NSAttributedStringKey.font: UIFont.boldSystemFont(ofSize: 17),
-        NSAttributedStringKey.foregroundColor: UIColor.gray,
-        NSAttributedStringKey.paragraphStyle: centeredParagraphStyle
-    ]
-    
-    static let subtitleAttributes = [
-        NSAttributedStringKey.font: UIFont.systemFont(ofSize: 12),
-        NSAttributedStringKey.foregroundColor: UIColor.darkGray,
-        NSAttributedStringKey.paragraphStyle: centeredParagraphStyle
-    ]
     
     @objc convenience init() {
         self.init(frame: .zero)


import Foundation

public final class TitleButton: UIButton {
    public var enableTitleCopy = false
    
    public override var canBecomeFirstResponder: Bool {

    }
    
    public func setTitle(title: String, subtitle: String?) {
        let normalString = NSMutableAttributedString(string: title, attributes: T.normalAttributes)
        let highlightedString = NSMutableAttributedString(string: title, attributes: T.highlightedAttributes)
        
        if let subtitle = subtitle {
            normalString.append(NSAttributedString(string: "\n" + subtitle, attributes: T.subtitleAttributes))
            highlightedString.append(NSAttributedString(string: "\n" + subtitle, attributes: T.subtitleAttributes))
            titleLabel?.lineBreakMode = .byWordWrapping
        } else {
            titleLabel?.lineBreakMode = .byTruncatingTail
