// // ToolTipLabelAttribute.swift // VDS // // Created by Matt Bruce on 10/4/22. // import Foundation import UIKit import Combine public struct ToolTipLabelAttribute: ActionLabelAttributeModel { public var id = UUID() public var accessibleText: String? = "Tool Tip" public var action = PassthroughSubject() public var location: Int public var length: Int public var tintColor: UIColor public func setAttribute(on attributedString: NSMutableAttributedString) { let image = ImageLabelAttribute(location: location, length: length, imageName: "info", frame: .init(x: 0, y: -2, width: 13.3, height: 13.3), tintColor: tintColor) image.setAttribute(on: attributedString) } public static func == (lhs: ToolTipLabelAttribute, rhs: ToolTipLabelAttribute) -> Bool { lhs.isEqual(rhs) } public func isEqual(_ equatable: ToolTipLabelAttribute) -> Bool { return id == equatable.id && range == equatable.range } }