//
//  RegistrationController.h
//  RegistrationClient
//
//  Created by Jeff Ganyard on 8/23/10.
//  Copyright 2011-2012 Nuance Communications, Inc. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "RegistrationInfo.h"
#import "MachineInfo.h"
#import "ProductInfo.h"
#import "UpgradeWindowInfo.h"
#import "ActivationAgent.h"
#import "ActivationHelper.h"
#import "SequenceViewController.h"

@class INCService2;
@class WebView;

@interface RegistrationController : SequenceViewController
{
    NSMutableDictionary *CompiledInfo; //used to send the information to the soap service.
    NSView *selectedUserNamePasswordView;
    BOOL skipRegistration;
    BOOL registrationOnly;
}
#define kRegistrationValidationCompleteNotification @"com.nuance.RegistrationController.RegistrationValidationComplete"
//NU-ARC
//should be weak when we switch to arc but weak is not currently available
@property (strong) IBOutlet RegistrationInfo *regInfo;
@property (strong) IBOutlet ProductInfo *prodInfo;
@property (strong) IBOutlet MachineInfo *macInfo;
@property (weak) IBOutlet NSButton *skipButton;
@property (weak) IBOutlet NSTextField *activationText;
@property (weak) IBOutlet NSWindow *window;
@property (weak) IBOutlet NSTextField *firstField;
@property (weak) IBOutlet NSProgressIndicator *nextProgressIndicator;
@property (weak) IBOutlet NSButton *continueButton;
@property (weak) IBOutlet NSButton *backButton;
@property (weak) IBOutlet NSView *nCustomerView;
@property (weak) IBOutlet NSView *nCustomerContinuedView;
@property (weak) IBOutlet NSView *modelInfoView;
@property (weak) IBOutlet NSView *surveyView;
@property (weak) IBOutlet NSView *existingCustomerView;
@property (weak) IBOutlet NSView *successScreen;
@property (weak) IBOutlet NSMatrix *customerType;
@property (weak) IBOutlet NSButton *privacyButton;
@property (weak) IBOutlet NSTextField *stateField;

@property (strong, nonatomic) ActivationAgent *activator;

- (id)initWithActivator:(ActivationAgent *)activator targetWindow:(NSWindow*)window;


- (IBAction)quit:(id)sender;
- (IBAction)registerLater:(id)sender;
- (IBAction)registerNow:(id)sender;

- (IBAction)openPrivacyPolicyAction:(id)sender;
- (IBAction)processRegistrationType:(id)sender;
- (IBAction)processFirstNewCustomerScreen:(id)sender;
- (IBAction)processSecondNewCustomerScreen:(id)sender;
- (IBAction)processModelCollectionScreen:(id)sender;
- (IBAction)processExistingCustomerScreen:(id)sender;
- (IBAction)successfulRegistrationContinueClicked:(id)sender;

- (void) setupNewCustomerSequence;
- (void) setupExistingCustomerSequence;

//this actually isn't a part of NSViewController until 10.10, so we'll have to call this manually
- (void)viewWillDisappear;
- (void)viewDidAppear;
- (void)startContinueBusy;
- (void)stopContinueBusy;

- (bool) shouldShow:(NSString*)ancestorStatus;
- (void) showAlert:(NSString *)title withMessage:(NSString*)message withButton1:(NSString*)button1Title
       withButton2:(NSString*)button2Title
       withButton3:(NSString*)button3Title;

@end
