//
//  RuleEqualsModel.swift
//  MVMCoreUI
//
//  Created by Suresh, Kamlesh on 2/24/20.
//  Copyright © 2020 Verizon Wireless. All rights reserved.
//

import Foundation

public class RuleEqualsModel: RuleCompareModelProtocol {
    //--------------------------------------------------
    // MARK: - Properties
    //--------------------------------------------------
    
    public static var identifier: String = "equals"
    public var type: String = RuleEqualsModel.identifier
    public var ruleId: String? 
    public var fields: [String]
    public var errorMessage: [String: String]?
    
    //--------------------------------------------------
    // MARK: - Initializer
    //--------------------------------------------------

    public init(fields: [String]) {
        self.fields = fields
    }

    //--------------------------------------------------
    // MARK: - Validation
    //--------------------------------------------------

    public func isValid(_ formField: FormFieldProtocol) -> Bool {
        return false
    }
    
    ///RuleCompareModelProtocol Method
    public func compare(lhs: AnyHashable?, rhs: AnyHashable?) -> Bool {
        return lhs == rhs
    }

}
