import type { _NSToolbar } from "./NSToolbar.js";
import type { _NSToolbarItem } from "./NSToolbarItem.js";
import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSNotification } from "../Foundation/NSNotification.js";
import type { _NSSet } from "../Foundation/NSSet.js";
import type { _NSString } from "../Foundation/NSString.js";
export interface _NSToolbarDelegate {
    /**
     * Given an item identifier, this method returns an item. Note that it is expected that each toolbar receives its own distinct copies and each time this method is called a new item must be returned. If the item has a custom view, that view should be in place when the item is returned. Finally, do not assume the returned item is going to be added as an active item in the toolbar. In fact, the toolbar may ask for items here in order to construct the customization palette. If `willBeInsertedIntoToolbar` is YES, the returned item will be inserted, and you can expect `toolbarWillAddItem:` is about to be posted.
     */
    toolbar$itemForItemIdentifier$willBeInsertedIntoToolbar$?(toolbar: _NSToolbar, itemIdentifier: _NSString, flag: boolean): _NSToolbarItem | null;
    /**
     * Returns the ordered list of items to be shown in the toolbar by default. If during initialization, no overriding values are found in the user defaults, or if the user chooses to revert to the default items this set will be used.
     */
    toolbarDefaultItemIdentifiers$?(toolbar: _NSToolbar): _NSArray;
    /**
     * Returns the list of all allowed items by identifier. By default, the toolbar does not assume any items are allowed so every allowed item must be explicitly listed. The set of allowed items is used to construct the customization palette. The order of items does not necessarily guarantee the order of appearance in the palette. At minimum, you should return the default item list.
     */
    toolbarAllowedItemIdentifiers$?(toolbar: _NSToolbar): _NSArray;
    /**
     * Optional method. Those wishing to indicate item selection in a toolbar should implement this method to return a non-empty array of selectable item identifiers. If implemented, the toolbar will remember and display the selected item with a special highlight. A selected item is one whose item identifier matches the current selected item identifier. Clicking on an item whose identifier is selectable will automatically update the toolbar's `selectedItemIdentifier` when possible. See `selectedItemIdentifier` for more details.
     */
    toolbarSelectableItemIdentifiers$?(toolbar: _NSToolbar): _NSArray;
    /** Items in this set cannot be dragged or removed by the user. */
    toolbarImmovableItemIdentifiers$?(toolbar: _NSToolbar): _NSSet;
    /**
     * Whether or not an item can be moved to a specified position in the toolbar. If implemented, this method will be called during a user drag and does not necessarily indicate the final position of an item. An index of NSNotFound indicates the item would be removed from the toolbar.
     */
    toolbar$itemIdentifier$canBeInsertedAtIndex$?(toolbar: _NSToolbar, itemIdentifier: _NSString, index: number): boolean;
    /**
     * Before a new item is added to the toolbar, this notification is posted. This is the best place to notice a new item is going into the toolbar. For instance, if you need to cache a reference to the toolbar item or need to set up some initial state, this is the best place to do it. The notification object is the toolbar to which the item is being added. The item being added and its new index can be found by referencing `NSToolbarItemKey` and `NSToolbarNewIndexKey` in the userInfo dictionary respectively.
     */
    toolbarWillAddItem$?(notification: _NSNotification): void;
    /**
     * After an item is removed from a toolbar the notification is sent. This allows the chance to tear down information related to the item that may have been cached. The notification object is the toolbar from which the item is being removed. The item being removed is found by referencing the `NSToolbarItemKey` in the userInfo.
     */
    toolbarDidRemoveItem$?(notification: _NSNotification): void;
}
