50 lines
1.5 KiB
Swift
50 lines
1.5 KiB
Swift
//
|
|
// RadioSwatchModel.swift
|
|
// VDS
|
|
//
|
|
// Created by Matt Bruce on 8/25/22.
|
|
//
|
|
|
|
import Foundation
|
|
import UIKit
|
|
|
|
public protocol RadioSwatchModel: Modelable, FormFieldable, DataTrackable, Accessable, Selectable, BinaryColorable {
|
|
var fillImage: String? { get set }
|
|
var primaryColor: UIColor? { get set }
|
|
var secondaryColor: UIColor? { get set }
|
|
var text: String { get set }
|
|
var textAttributes: [LabelAttributeModel]? { get set }
|
|
var strikethrough: Bool { get set }
|
|
}
|
|
|
|
public struct DefaultRadioSwatchModel: RadioSwatchModel {
|
|
public var id: UUID = UUID()
|
|
public var selected: Bool = false
|
|
|
|
public var fillImage: String?
|
|
@OptionalCodableColor public var primaryColor: UIColor?
|
|
@OptionalCodableColor public var secondaryColor: UIColor?
|
|
public var text: String = ""
|
|
public var textAttributes: [LabelAttributeModel]?
|
|
public var strikethrough: Bool = false
|
|
|
|
public var inputId: String?
|
|
public var value: AnyHashable?
|
|
|
|
public var surface: Surface = .light
|
|
public var disabled: Bool = false
|
|
|
|
public var dataAnalyticsTrack: String?
|
|
public var dataClickStream: String?
|
|
public var dataTrack: String?
|
|
public var accessibilityHintEnabled: String?
|
|
public var accessibilityHintDisabled: String?
|
|
public var accessibilityValueEnabled: String?
|
|
public var accessibilityValueDisabled: String?
|
|
public var accessibilityLabelEnabled: String?
|
|
public var accessibilityLabelDisabled: String?
|
|
|
|
public init() {}
|
|
|
|
}
|