//
//  XTHtmlLinebreakHandler2.h
//  TadsTerp
//
//  Created by Rune Berg on 11/05/14.
//  Copyright (c) 2014 Rune Berg. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "XTHtmlTag.h"


//TODO rename if works
@interface XTHtmlLinebreakHandler2 : NSObject

typedef NS_ENUM(NSInteger, XTHtmlLinebreakHandler2State) {
	XT_LINEBREAKHANDLER2_AT_START_OF_LINE,
	XT_LINEBREAKHANDLER2_AFTER_TAB_START_OF_LINE,
	XT_LINEBREAKHANDLER2_IN_TEXT
};
@property (readonly) XTHtmlLinebreakHandler2State state;

- (void)resetForNextCommand;

- (NSString *)handleTagBr:(NSInteger)height;

- (NSString *)handleTagP;

//TODO rm - (NSString *)handleStartDiv;

- (NSString *)handleEndDiv;

- (NSString *)handleTagTab;

- (NSString *)handleEndLi;

- (void)handleText:(NSString *)text;

- (NSString *)handleBlockLevelNewline:(XTHtmlTag *)tag;

@end
