import type { NobjcObject } from "objc-js";
import type { _NSColor } from "./NSColor.js";
import type { _NSDraggingInfo } from "./NSDraggingInfo.js";
import type { _NSDraggingSession } from "./NSDraggingSession.js";
import type { _NSFilePromiseProvider } from "./NSFilePromiseProvider.js";
import type { _NSImage } from "./NSImage.js";
import type { _NSPasteboard } from "./NSPasteboard.js";
import type { _NSPasteboardItem } from "./NSPasteboardItem.js";
import type { _NSSound } from "./NSSound.js";
import type { _NSTableColumn } from "./NSTableColumn.js";
import type { _NSTableView } from "./NSTableView.js";
import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSIndexSet } from "../Foundation/NSIndexSet.js";
import type { _NSURL } from "../Foundation/NSURL.js";
import type { CGPoint } from "../structs/CGPoint.js";
import type { NSDragOperation } from "./NSDragOperation.js";
import type { NSTableViewDropOperation } from "./NSTableViewDropOperation.js";
export interface _NSTableViewDataSource {
    numberOfRowsInTableView$?(tableView: _NSTableView): number;
    /**
     * This method is required for the "Cell Based" TableView, and is optional for the "View Based" TableView. If implemented in the latter case, the value will be set to the view at a given row/column if the view responds to -setObjectValue: (such as NSControl and NSTableCellView). Note that NSTableCellView does not actually display the objectValue, and its value is to be used for bindings. See NSTableCellView.h for more information.
     */
    tableView$objectValueForTableColumn$row$?(tableView: _NSTableView, tableColumn: _NSTableColumn | null, row: number): NobjcObject | null;
    /** NOTE: This method is not called for the View Based TableView. */
    tableView$setObjectValue$forTableColumn$row$?(tableView: _NSTableView, object_: NobjcObject | null, tableColumn: _NSTableColumn | null, row: number): void;
    /**
     * Sorting support This is the indication that sorting needs to be done. Typically the data source will sort its data, reload, and adjust selections.
     */
    tableView$sortDescriptorsDidChange$?(tableView: _NSTableView, oldDescriptors: _NSArray): void;
    /**
     * Dragging Source Support - Required for multi-image dragging. Implement this method to allow the table to be an NSDraggingSource that supports multiple item dragging. Return a custom object that implements NSPasteboardWriting (or simply use NSPasteboardItem). If this method is implemented, then tableView:writeRowsWithIndexes:toPasteboard: will not be called.
     */
    tableView$pasteboardWriterForRow$?(tableView: _NSTableView, row: number): _NSColor | _NSFilePromiseProvider | _NSImage | _NSPasteboardItem | _NSSound | null;
    /**
     * Dragging Source Support - Optional. Implement this method to know when the dragging session is about to begin and to potentially modify the dragging session.'rowIndexes' are the row indexes being dragged, excluding rows that were not dragged due to tableView:pasteboardWriterForRow: returning nil. The order will directly match the pasteboard writer array used to begin the dragging session with [NSView beginDraggingSessionWithItems:event:source]. Hence, the order is deterministic, and can be used in -tableView:acceptDrop:row:dropOperation: when enumerating the NSDraggingInfo's pasteboard classes.
     */
    tableView$draggingSession$willBeginAtPoint$forRowIndexes$?(tableView: _NSTableView, session: _NSDraggingSession, screenPoint: CGPoint, rowIndexes: _NSIndexSet): void;
    /**
     * Dragging Source Support - Optional. Implement this method to know when the dragging session has ended. This delegate method can be used to know when the dragging source operation ended at a specific location, such as the trash (by checking for an operation of NSDragOperationDelete).
     */
    tableView$draggingSession$endedAtPoint$operation$?(tableView: _NSTableView, session: _NSDraggingSession, screenPoint: CGPoint, operation: NSDragOperation): void;
    /**
     * Dragging Destination Support - Required for multi-image dragging. Implement this method to allow the table to update dragging items as they are dragged over the view. Typically this will involve calling [draggingInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:] and setting the draggingItem's imageComponentsProvider to a proper image based on the content. For View Based TableViews, one can use NSTableCellView's -draggingImageComponents. For cell based TableViews, use NSCell's draggingImageComponentsWithFrame:inView:.
     * @deprecated Use -tableView:pasteboardWriterForRow: instead
     */
    tableView$updateDraggingItemsForDrag$?(tableView: _NSTableView, draggingInfo: _NSDraggingInfo): void;
    /**
     * Dragging Source Support - Optional for single-image dragging. Implement this method to support single-image dragging. Use the more modern tableView:pasteboardWriterForRow: to support multi-image dragging. This method is called after it has been determined that a drag should begin, but before the drag has been started. To refuse the drag, return NO. To start a drag, return YES and place the drag data onto the pasteboard (data, owner, etc...). The drag image and other drag related information will be set up and provided by the table view once this call returns with YES. 'rowIndexes' contains the row indexes that will be participating in the drag.
     * @deprecated Use -tableView:pasteboardWriterForRow: instead
     */
    tableView$writeRowsWithIndexes$toPasteboard$?(tableView: _NSTableView, rowIndexes: _NSIndexSet, pboard: _NSPasteboard): boolean;
    /**
     * Dragging Destination Support - This method is used by NSTableView to determine a valid drop target. Based on the mouse position, the table view will suggest a proposed drop 'row' and 'dropOperation'. This method must return a value that indicates which NSDragOperation the data source will perform. The data source may "re-target" a drop, if desired, by calling setDropRow:dropOperation: and returning something other than NSDragOperationNone. One may choose to re-target for various reasons (eg. for better visual feedback when inserting into a sorted position).
     */
    tableView$validateDrop$proposedRow$proposedDropOperation$?(tableView: _NSTableView, info: _NSDraggingInfo, row: number, dropOperation: NSTableViewDropOperation): NSDragOperation;
    /**
     * Dragging Destination Support - This method is called when the mouse is released over an NSTableView that previously decided to allow a drop via the validateDrop method. The data source should incorporate the data from the dragging pasteboard at this time. 'row' and 'dropOperation' contain the values previously set in the validateDrop: method.
     * @deprecated Use NSFilePromiseReceiver objects instead
     */
    tableView$acceptDrop$row$dropOperation$?(tableView: _NSTableView, info: _NSDraggingInfo, row: number, dropOperation: NSTableViewDropOperation): boolean;
    /**
     * Dragging Destination Support - NSTableView data source objects can support file promised drags by adding NSFilesPromisePboardType to the pasteboard in tableView:writeRowsWithIndexes:toPasteboard:. NSTableView implements -namesOfPromisedFilesDroppedAtDestination: to return the results of this data source method. This method should returns an array of filenames for the created files (filenames only, not full paths). The URL represents the drop location. For more information on file promise dragging, see documentation on the NSDraggingSource protocol and -namesOfPromisedFilesDroppedAtDestination:.
     * @deprecated Use NSFilePromiseReceiver objects instead
     */
    tableView$namesOfPromisedFilesDroppedAtDestination$forDraggedRowsWithIndexes$?(tableView: _NSTableView, dropDestination: _NSURL, indexSet: _NSIndexSet): _NSArray;
}
