import Foundation

extension AuthState {
    static func reducer(state: inout AuthState, action: AuthAction) {
        switch action {
        case .setAuthType(let type):
            state.authType = type

        case .setPassword(let pass):
            state.pass = pass

        case .gotAuthResult(let result):
            state.authStatus = result

        default:
            break
        }
    }
}
