// // TiletTitleModel.swift // VDS // // Created by Matt Bruce on 1/6/23. // import Foundation extension Tilelet { public struct TitleModel { //-------------------------------------------------- // MARK: - Enums //-------------------------------------------------- public enum StandardStyle: String, EnumSubset { case titleXLarge case titleLarge case titleMedium case titleSmall public var defaultValue: TitleLockup.TitleStandardStyle { .titleSmall } } //-------------------------------------------------- // MARK: - Public Properties //-------------------------------------------------- public var text: String = "" /// Array of LabelAttributeModel objects used in rendering the text. public var textAttributes: [any LabelAttributeModel]? public var standardStyle: StandardStyle = .titleSmall //-------------------------------------------------- // MARK: - Initializers //-------------------------------------------------- public init(text: String, textAttributes: [any LabelAttributeModel]? = nil, standardStyle: StandardStyle = .titleSmall) { self.text = text self.textAttributes = textAttributes self.standardStyle = standardStyle } //-------------------------------------------------- // MARK: - Public Methods //-------------------------------------------------- public func toTitleLockupTitleModel() -> TitleLockup.TitleModel { TitleLockup.TitleModel(text: text, textAttributes: textAttributes, standardStyle: standardStyle.value) } } }