//
//  ViewController.m
//  O2MCTaggerTest
//
//  Created by Nicky Romeijn on 27-06-16.
//  Copyright (c) 2016 Adversitement. All rights reserved.
//


#import "ViewController.h"
#import <O2MC.h>
#import <Tagger.h>

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.O2MC = [[O2MC alloc] init:@"TestApp" :@"https://baltar-dev.dimml.io/flow/code.js?dimml.concept=//nromeijn@hema.android/AndroidNative" :[NSNumber numberWithInt:10] :YES];
}
- (IBAction)setEndpoint:(UITextField *)textField {
     self.O2MC = [[O2MC alloc] init:@"TestApp" :textField.text :[NSNumber numberWithInt:10] :YES];
}

- (IBAction)TrackWithProps:(id)sender {
    [self.O2MC.tracker trackWithProperties:@"btnPress" :@"{'hello':'world'}"];
}

- (IBAction)trackEventStart:(id)sender {
    [self.O2MC.tracker timeEventStart:@"timer"];
}

- (IBAction)trackEventStop:(id)sender {
     [self.O2MC.tracker timeEventStop:@"timer"];
}

- (IBAction)Track:(id)sender {
    [self.O2MC.tracker track:@"btnPress"];
    NSLog(@"Dit is een test %@",@"Track btn");
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)setAlias:(UITextField *)textField {
    [self.O2MC.tracker createAlias:textField.text];
}


- (IBAction)Identifiy:(UITextField *)textField {
      [self.O2MC.tracker identify:textField.text];
}


@end