//
//  GSEditCustomFilterWindowController.h
//  Glyphs 4
//
//  Created by Georg Seifert on 25.03.23.
//  Copyright © 2023 schriftgestaltung.de. All rights reserved.
//

NS_ASSUME_NONNULL_BEGIN

@class GSSidebarItem;
@class GSEditFilterWindowController;

@protocol GSEditCustomFilterWindowDelegate

- (void)didAddNewSidebarItem:(GSSidebarItem *)item;

- (void)didChangeSidebarItem:(GSSidebarItem *)item;

- (NSArray *)fontScripts;

@end

@interface GSEditFilterWindowController : NSWindowController

@property (unsafe_unretained, nonatomic) NSObject<GSEditCustomFilterWindowDelegate> *filterDelegate;

@property (unsafe_unretained, nonatomic) IBOutlet NSTextField *filterNameField;
@property (unsafe_unretained, nonatomic) IBOutlet NSTabView *filterTabView;
@property (unsafe_unretained, nonatomic) IBOutlet NSTextView *listTextView;
#if !TARGET_OS_IOS
@property (unsafe_unretained, nonatomic) IBOutlet NSPredicateEditor *predicateEditor;
@property (unsafe_unretained, nonatomic) IBOutlet NSButton *predicateWindowOkButton;
@property (unsafe_unretained, nonatomic) IBOutlet NSButton *predicateWindowCancelButton;
@property (unsafe_unretained, nonatomic) IBOutlet NSButton *showGlyphCountToggle;
#endif

- (void)editCustomFilterItem:(GSSidebarItem *)item window:(NSWindow *)window;

@end

NS_ASSUME_NONNULL_END
