import type { NobjcObject } from "objc-js";
import type { _NSImage } from "./NSImage.js";
import type { _NSSharingService } from "./NSSharingService.js";
import type { _NSView } from "./NSView.js";
import type { _NSWindow } from "./NSWindow.js";
import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSError } from "../Foundation/NSError.js";
import type { CGRect } from "../structs/CGRect.js";
export interface _NSSharingServiceDelegate {
    sharingService$willShareItems$?(sharingService: _NSSharingService, items: _NSArray): void;
    sharingService$didFailToShareItems$error$?(sharingService: _NSSharingService, items: _NSArray, error: _NSError): void;
    sharingService$didShareItems$?(sharingService: _NSSharingService, items: _NSArray): void;
    /**
     * The following methods are invoked when the service is performed and the sharing window pops up, to present a transition between the original items and the sharing window.
     */
    sharingService$sourceFrameOnScreenForShareItem$?(sharingService: _NSSharingService, item: NobjcObject): CGRect;
    /**
     * When non-nil, the image returned would be used for the transitioning animation. When nil, the transitioning animation is disabled.
     */
    sharingService$transitionImageForShareItem$contentRect$?(sharingService: _NSSharingService, item: NobjcObject, contentRect: NobjcObject): _NSImage | null;
    sharingService$sourceWindowForShareItems$sharingContentScope$?(sharingService: _NSSharingService, items: _NSArray, sharingContentScope: NobjcObject): _NSWindow | null;
    /**
     * The following method is invoked when the service is performed and wants to display its contents in a popover. The delegate should return the view that will act as the anchor of the popover, along with the target rectangle within the bounds of that view and preferred edge of that rectangle for the popover to appear. The delegate may also return nil, indicating that there is no anchoring view currently available, in which case the service may attempt to display the service via some other means. The service named NSSharingServiceNameCloudSharing prefers to display itself using a popover anchored to an "Add People" or "Share" button. If no such button is available or visible, return nil.
     */
    anchoringViewForSharingService$showRelativeToRect$preferredEdge$?(sharingService: _NSSharingService, positioningRect: NobjcObject, preferredEdge: NobjcObject): _NSView | null;
}
