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

#import "LSTile+RCTNativeModel.h"
#import <React/RCTUtils.h>
#import "LSTileContent+RCTNativeModel.h"

@implementation LSTile (RCTNativeModel)
- (NSDictionary *)reactNativeRepresentation {
    return @{
             @"tileId" : @(RCTZeroIfNaN(self.tileId)),
             @"priority" : @(RCTZeroIfNaN(self.priority)),
             @"dismissable" : @(self.dismissable),
             @"active" : @(self.active),
             @"actionType" : RCTNullIfNil(self.actionType),
             @"action" : RCTNullIfNil(self.action),
             @"name" : RCTNullIfNil(self.name),
             @"content" : [self.content reactNativeRepresentation],
             @"criteria" : RCTNullIfNil(self.criteria)
             };
}

@end
