removed inverted

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2024-07-25 10:39:40 -05:00
parent cb30a58db6
commit 226c23abae

View File

@ -21,8 +21,6 @@ open class RadioButtonModel: FormFieldModel {
public var fieldValue: String? public var fieldValue: String?
public var action: ActionModelProtocol? public var action: ActionModelProtocol?
public var inverted: Bool = false
public var surface: Surface { inverted ? .dark : .light }
//-------------------------------------------------- //--------------------------------------------------
// MARK: - Keys // MARK: - Keys
@ -32,7 +30,6 @@ open class RadioButtonModel: FormFieldModel {
case state case state
case fieldValue case fieldValue
case action case action
case inverted
} }
//-------------------------------------------------- //--------------------------------------------------
@ -77,9 +74,6 @@ open class RadioButtonModel: FormFieldModel {
baseValue = state baseValue = state
fieldValue = try typeContainer.decodeIfPresent(String.self, forKey: .fieldValue) fieldValue = try typeContainer.decodeIfPresent(String.self, forKey: .fieldValue)
action = try typeContainer.decodeModelIfPresent(codingKey: .action) action = try typeContainer.decodeModelIfPresent(codingKey: .action)
if let inverted = try typeContainer.decodeIfPresent(Bool.self, forKey: .inverted) {
self.inverted = inverted
}
} }
public override func encode(to encoder: Encoder) throws { public override func encode(to encoder: Encoder) throws {
@ -88,6 +82,5 @@ open class RadioButtonModel: FormFieldModel {
try container.encode(state, forKey: .state) try container.encode(state, forKey: .state)
try container.encodeIfPresent(fieldValue, forKey: .fieldValue) try container.encodeIfPresent(fieldValue, forKey: .fieldValue)
try container.encodeModelIfPresent(action, forKey: .action) try container.encodeModelIfPresent(action, forKey: .action)
try container.encodeIfPresent(inverted, forKey: .inverted)
} }
} }