//
//  GSFontCheckerProtocol.h
//  GlyphsCore
//
//  Created by Georg Seifert on 15.03.18.
//  Copyright © 2018 schriftgestaltung.de. All rights reserved.
//

@class GSFont;

extern NSString *GSFontCheckerItemTitleKey;
extern NSString *GSFontCheckerItemIsGroupKey;
extern NSString *GSFontCheckerItemActionIndexKey;
extern NSString *GSFontCheckerItemHandlerKey;
extern NSString *GSFontCheckerItemLayerKey;
extern NSString *GSFontCheckerItemGlyphsKey;
extern NSString *GSFontCheckerItemFirstActionTitleKey;
extern NSString *GSFontCheckerItemSecondActionTitleKey;

@protocol GSFontCheckerProtocol <NSObject>

- (NSArray *)checkFont:(GSFont *)font error:(out NSError **)error;

/**
 The top level keys are the error category and the values are a list of mutable dicts with at least this key: `GSFontCheckerItemTitleKey`
 */
- (NSDictionary <NSString *, NSArray *> *)validateFont:(GSFont *)font error:(out NSError **)error;

/**
 On of the results that was retuned from one of the methods above. Solve the conflict/error if possible
 */
- (BOOL)processValidatorResult:result error:(out NSError **)error;

@optional

/// only implement if Ture
- (BOOL)runOnVersionChangeOnly;
@end
