import type { NobjcObject } from "objc-js";
import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSString } from "../Foundation/NSString.js";
import type { _NSMenu } from "./NSMenu.js";
import type { _NSPasteboard } from "./NSPasteboard.js";
import type { _NSTextFieldDelegate } from "./NSTextFieldDelegate.js";
import type { _NSTokenField } from "./NSTokenField.js";
import type { NSTokenStyle } from "./NSTokenStyle.js";
export interface _NSTokenFieldDelegate extends _NSTextFieldDelegate {
    /**
     * Allows the delegate to provide an array of appropriate completions for the contents of the receiver @param tokenField The token field where editing is occurring @param substring The partial string that is being completed @param tokenIndex The index of the token being completed @param selectedIndex Optionally, you can return by reference an index into the returned array that specifies which of the completions should be initially selected. If none are to be selected, return by reference `-1`. @return An array of strings (`NSString`) that are possible completions, or `nil` to provide no completions @discussion If the delegate does not implement this method, no completions are provided
     */
    tokenField$completionsForSubstring$indexOfToken$indexOfSelectedItem$?(tokenField: _NSTokenField, substring: _NSString, tokenIndex: number, selectedIndex: NobjcObject | null): _NSArray | null;
    /**
     * return an array of represented objects you want to add. If you want to reject the add, return an empty array. returning nil will cause an error.
     */
    tokenField$shouldAddObjects$atIndex$?(tokenField: _NSTokenField, tokens: _NSArray, index: number): _NSArray;
    /**
     * If you return nil or don't implement these delegate methods, we will assume editing string = display string = represented object
     */
    tokenField$displayStringForRepresentedObject$?(tokenField: _NSTokenField, representedObject: NobjcObject): _NSString | null;
    tokenField$editingStringForRepresentedObject$?(tokenField: _NSTokenField, representedObject: NobjcObject): _NSString | null;
    tokenField$representedObjectForEditingString$?(tokenField: _NSTokenField, editingString: _NSString): NobjcObject | null;
    /**
     * We put the string on the pasteboard before calling this delegate method. By default, we write the NSStringPboardType as well as an array of NSStrings.
     */
    tokenField$writeRepresentedObjects$toPasteboard$?(tokenField: _NSTokenField, objects: _NSArray, pboard: _NSPasteboard): boolean;
    /** Return an array of represented objects to add to the token field. */
    tokenField$readFromPasteboard$?(tokenField: _NSTokenField, pboard: _NSPasteboard): _NSArray | null;
    /** By default the tokens have no menu. */
    tokenField$menuForRepresentedObject$?(tokenField: _NSTokenField, representedObject: NobjcObject): _NSMenu | null;
    tokenField$hasMenuForRepresentedObject$?(tokenField: _NSTokenField, representedObject: NobjcObject): boolean;
    /**
     * This method allows you to change the style for individual tokens as well as have mixed text and tokens.
     */
    tokenField$styleForRepresentedObject$?(tokenField: _NSTokenField, representedObject: NobjcObject): NSTokenStyle;
}
