//
//  Participant+DictRepresentation.m
//  react-native-rainbow-module
//
//  Created by Doha Tubaileh on 19/5/2022.
//

#import "Participant+DictRepresentation.h"
#import "Contact+DictRepresentation.h"

@implementation Participant (DictRepresentation)

-(NSDictionary*) participantToDictionaryRepresentation {
    NSMutableDictionary *participantDic = [self.contact contactDictionaryRepresentation].mutableCopy;
    BOOL isModerator = self.privilege == ParticipantPrivilegeModerator || self.privilege == ParticipantPrivilegeOwner;
    [participantDic setValue: [NSNumber numberWithBool:isModerator]  forKey:@"isModerator"];
    return participantDic;
}

@end
