vds_ios/VDS/Components/RadioSwatch/RadioSwatchModel.swift
Matt Bruce 78d97fd936 kind of working swatch
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
2022-08-30 14:36:13 -05:00

69 lines
2.4 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, Equatable {
var fillImage: String? { get set }
var primaryColor: UIColor? { get set }
var secondaryColor: UIColor? { get set }
var text: String { get set }
var strikethrough: Bool { get set }
}
public struct DefaultRadioSwatchModel: RadioSwatchModel {
public static func == (lhs: DefaultRadioSwatchModel, rhs: DefaultRadioSwatchModel) -> Bool {
return lhs.selected == rhs.selected &&
lhs.fillImage == rhs.fillImage &&
lhs.primaryColor == rhs.primaryColor &&
lhs.secondaryColor == rhs.secondaryColor &&
lhs.secondaryColor == rhs.secondaryColor &&
lhs.strikethrough == rhs.strikethrough &&
lhs.inputId == rhs.inputId &&
lhs.value == rhs.value &&
lhs.surface == rhs.surface &&
lhs.disabled == rhs.disabled &&
lhs.dataAnalyticsTrack == rhs.dataAnalyticsTrack &&
lhs.dataClickStream == rhs.dataClickStream &&
lhs.accessibilityHintEnabled == rhs.accessibilityHintEnabled &&
lhs.accessibilityHintDisabled == rhs.accessibilityHintDisabled &&
lhs.accessibilityValueEnabled == rhs.accessibilityValueEnabled &&
lhs.accessibilityValueDisabled == rhs.accessibilityValueDisabled &&
lhs.accessibilityLabelEnabled == rhs.accessibilityLabelEnabled &&
lhs.accessibilityLabelDisabled == rhs.accessibilityLabelDisabled
}
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 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() {}
}