// // TiletSubTitleModel.swift // VDS // // Created by Matt Bruce on 1/6/23. // import Foundation extension Tilelet { public struct SubTitleModel { //-------------------------------------------------- // MARK: - Enums //-------------------------------------------------- public enum StandardStyle: String, EnumSubset { case bodyLarge case bodyMedium case bodySmall public var defaultValue: TitleLockup.OtherStandardStyle { .bodySmall } } //-------------------------------------------------- // MARK: - Public Properties //-------------------------------------------------- public var text: String = "" public var standardStyle: StandardStyle = .bodySmall /// Array of LabelAttributeModel objects used in rendering the text. public var textAttributes: [any LabelAttributeModel]? public var textColor: Use = .primary //-------------------------------------------------- // MARK: - Initializers //-------------------------------------------------- public init(text: String, textColor: Use = .primary, textAttributes: [any LabelAttributeModel]? = nil, standardStyle: StandardStyle = .bodySmall) { self.text = text self.textAttributes = textAttributes self.textColor = textColor self.standardStyle = standardStyle } //-------------------------------------------------- // MARK: - Public Methods //-------------------------------------------------- public func toTitleLockupSubTitleModel() -> TitleLockup.SubTitleModel { TitleLockup.SubTitleModel(text: text, standardStyle: standardStyle.value, textColor: textColor, textAttributes: textAttributes) } } }