//
//  CallLog+CallStateToReactConverter.m
//  rainbow
//
//  Created by Doha Tubaileh on 9/30/19.
//  Copyright © 2019 Facebook. All rights reserved.
//

#import "CallLog+CallStateToReactConverter.h"

@implementation CallLog (CallStateToReactConverter)

-(NSString*)callStateConverterForReact {
    
    if (self.isOutgoing) {
        switch (self.state) {
            case CallLogStateAnswered:
                return @"Answered Outgoing";
            default:
                return @"Missed Outgoing";
        }
    }
    else {
        switch (self.state) {
            case CallLogStateAnswered:
                return @"Answered Incoming";
            default:
                return @"Missed Incoming";
        }
    }
}

@end
