//
//  MPActivationWindowController.h
//  FXPhotoStudioMac
//
//  Created by Demon  on 5/19/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>


typedef enum MPSActivationStyle
{
    MPSActivationStyleWelcome,
    MPSActivationStyleExport,
    MPSActivationStyleActivate
} MPSActivationStyle;


@class MPAbstractButton;

@protocol MPActivationWindowControllerDelegate;

@interface MPActivationWindowController : NSWindowController <NSTextFieldDelegate, NSTextViewDelegate>
{
	NSString *_currentActivationKey;
	NSUInteger _validationKeyCountErrors;
}

@property (nonatomic, weak) IBOutlet NSTextField *activationCodeTextField;
@property (nonatomic, weak) IBOutlet NSTextField *emailTextField;
@property (nonatomic, weak) IBOutlet MPAbstractButton *tryItButton;
@property (nonatomic, weak) IBOutlet MPAbstractButton *activateButton;

@property (nonatomic, weak) IBOutlet MPAbstractButton *activationPopUp;
@property (nonatomic, weak) IBOutlet NSImageView *aboutLogo;


@property (nonatomic, assign) id <MPActivationWindowControllerDelegate> delegate;
@property (nonatomic ,copy) NSString* currentActivationKey;

@property (nonatomic, assign) BOOL demoVersion;

@property (nonatomic, copy) NSString *demoWelcomeDescriptionStr1;
@property (nonatomic, copy) NSString *demoWelcomeDescriptionStr2;


- (instancetype)initWithStyle:(MPSActivationStyle)style;

- (IBAction)doneActivationButtonClick:(id)sender;
- (IBAction)tryTrialVersion:(id)sender;
- (IBAction)clickToBuyButtonClick:(id)sender;
- (IBAction)activateButtonClick:(MPAbstractButton *)sender;
- (IBAction)closeActivateWindow:(id)sender;
- (IBAction)closeWindow:(id)sender;
- (IBAction)openMacphunSite:(id)sender;

@end

@protocol MPActivationWindowControllerDelegate

- (NSInteger)closeActivationWindowControllerForActivationKey:(NSString*)activationKey userName:(NSString*)name email:(NSString*)email;
- (BOOL)activationWindowControllerShouldShowWelcomeScreen;

@end
