//
//  LSQuestion+RCTNativeModel.m
//  ReactLightspeedSDK
//
//  Created by marc matta on 10/13/16.
//  Copyright © 2016 com.lightspeed. All rights reserved.
//

#import "LSQuestion+RCTNativeModel.h"
#import "RCTLSUtils.h"
#import "LSAnswerOption+RCTNativeModel.h"
@implementation LSQuestion (RCTNativeModel)
    
- (NSDictionary *)reactNativeRepresentation {
    return @{@"questionId":RCTNullIfNil(self.questionId),
             @"text":RCTNullIfNil(self.text),
             @"type":RCTNullIfNil(self.type),
             @"inquestType":RCTNullIfNil(self.inquestType),
             @"rowSize":RCTNullIfNil(self.rowSize),
             @"answersSequence":RCTNullIfNil(self.answersSequence),
             @"maxAnswers":RCTNullIfNil(self.maxAnswers),
             @"defaultAnswerCode":RCTNullIfNil(self.defaultAnswerCode),
             @"answers": [RCTLSUtils LSArrayFromNativeModels:self.answers]
             };
}

@end
