import type { NobjcObject } from "objc-js";
import type { _NSAccessibility } from "./NSAccessibility.js";
import type { _NSAppearance } from "./NSAppearance.js";
import type { _NSPopoverDelegate } from "./NSPopoverDelegate.js";
import type { _NSResponder } from "./NSResponder.js";
import type { _NSToolbarItem } from "./NSToolbarItem.js";
import type { _NSView } from "./NSView.js";
import type { _NSViewController } from "./NSViewController.js";
import type { _NSCoder } from "../Foundation/NSCoder.js";
import type { CGRect } from "../structs/CGRect.js";
import type { CGSize } from "../structs/CGSize.js";
import type { NSRectEdge } from "../Foundation/NSRectEdge.js";
import type { NSPopoverBehavior } from "./NSPopoverBehavior.js";
export declare class _NSPopover extends _NSResponder {
    static alloc(): _NSPopover;
    static new(): _NSPopover;
    init(): _NSPopover;
    initWithCoder$(coder: _NSCoder): _NSPopover | null;
    /**
     * Shows the popover anchored to the specified view. The popover will animate onscreen and eventually animate offscreen when it is closed (unless the property `animates` is set to `NO`). - Parameters: - positioningRect: The rectangle within `positioningView` relative to which the popover should be positioned. Normally set to the bounds of `positioningView`. May be an empty rectangle, which will default to the bounds of `positioningView`. - positioningView: The view relative to which the popover should be positioned. Causes the method to raise `NSInvalidArgumentException` if `nil`. - preferredEdge: The edge of `positioningView` the popover should prefer to be anchored to (respects to the `-isFlipped` state of `positioningView`). The current (but not guaranteed) behavior is that AppKit will place the anchor towards the `preferredEdge` of the `positioningRect` unless such a placement would cause the popover not to fit on the screen of `positioningView`. If the anchor cannot be placed towards the `preferredEdge`, AppKit will (in the current implementation) attempt to place the anchor on the opposite side of the `positioningRect`. If that cannot be done, AppKit will attempt to place the anchor on a remaining side of the popover, and failing that will center the popover on the screen, causing it to (at least temporarily) lose its anchor. - Note: This method will throw a `NSInvalidArgumentException` if view is `nil` or if `view` is not in a window, or if the popover’s behavior is `NSPopoverBehaviorSemitransient` and the popover’s `positioningView` is in a popover or child window. It will throw a `NSInternalInconsistencyException` if the popover’s content view controller (or the view controller’s view) is `nil`. If the popover is already being shown, this method will update to be associated with the new `view` and `positioningRect` passed. - Note: If the positioning view isn’t visible (its window isn’t visible, or the positioning rect is outside of its visible rect), this method does nothing.
     */
    showRelativeToRect$ofView$preferredEdge$(positioningRect: CGRect, positioningView: _NSView, preferredEdge: NSRectEdge): void;
    /**
     * Shows the popover positioned relative to \c toolbarItem . When the item is in the overflow menu, the popover will be presented from another appropriate affordance in the window. See the comments in \c -showRelativeToRect:ofView:preferredEdge: for the popover behavior. This method will throw an \c NSInvalidArgumentException if it cannot locate the toolbar item. This could happen because the item is not in a toolbar, or because the toolbar is not in a window.
     */
    showRelativeToToolbarItem$(toolbarItem: _NSToolbarItem): void;
    /**
     * Attempts to close the popover. The popover will not be closed if it has a delegate and the delegate returns NO to -popoverShouldClose: (or if the popover's class implements -popoverShouldClose: to return NO). The operation will fail if it is displaying a nested popover, or if it has a child window. A window will attempt to close its popovers when it receives a -performClose: message. The popover will animate out when closed (unless the animates property is set to NO).
     */
    performClose$(sender: NobjcObject | null): void;
    /**
     * Forces the popover to close without consulting its delegate. Any popovers nested within the popovers will also receive a close message. When a window is closed in response to the -close message being sent, all of its popovers will be closed. The popover will animate out when closed (unless the animates property is set to NO).
     */
    close(): void;
    /** The delegate of the popover. The delegate is not retained. */
    delegate(): _NSPopoverDelegate | null;
    setDelegate$(value: _NSPopoverDelegate | null): void;
    /**
     * The appearance of the popover. The popover's contentView will inherit this appearance. The default effective appearance is the NSAppearanceNameVibrantLight appearance. If nil is set, nil will be returned, and the effective appearance will return to the default. To prevent conflicts with the previous appearance property, this is only available for apps that target 10.10 and higher.
     */
    appearance(): _NSAppearance;
    setAppearance$(value: _NSAppearance): void;
    effectiveAppearance(): _NSAppearance;
    /**
     * The behavior of the popover. The default behavior is NSPopoverBehaviorApplicationDefined. See the declaration of NSPopoverBehavior above for more information about popover behaviors.
     */
    behavior(): NSPopoverBehavior;
    setBehavior$(value: NSPopoverBehavior): void;
    /**
     * Should the popover be animated when it shows, closes, or appears to transition to a detachable window. This property also controls whether the popover animates when the content view or content size changes. AppKit does not guarantee which behaviors will be animated or that this property will be respected; it is regarded as a hint. The default value is YES.
     */
    animates(): boolean;
    setAnimates$(value: boolean): void;
    /**
     * The view controller that manages the content of the popover. The default value is nil. You must set the content view controller of the popover to a non-nil value before the popover is shown. Changes to the popover's content view controller while the popover is shown will animate (provided animates is YES).
     */
    contentViewController(): _NSViewController | null;
    setContentViewController$(value: _NSViewController | null): void;
    /**
     * The content size of the popover. The popover's content size is set to match the size of the content view when the content view controller is set. Changes to the content size of the popover will animate while the popover is shown (provided animates is YES).
     */
    contentSize(): CGSize;
    setContentSize$(value: CGSize): void;
    /**
     * YES if the popover is being shown, NO otherwise. The popover is considered to be shown from the point when -showRelativeToRect:ofView:preferredEdge: is invoked until the popover is closed in response to an invocation of either -close or -performClose:.
     */
    shown(): boolean;
    /**
     * Returns \c YES if the window is detached to an implicitly created detached window, \c NO otherwise. This method does not apply when the popover is detached to a window returned with \c -detachableWindowForPopover:.
     */
    detached(): boolean;
    /**
     * Popovers are positioned relative to a positioning view and are automatically moved when the location or size of the positioning view changes. Sometimes it is desirable to position popovers relative to a rectangle within the positioning view. In this case, you must update the positioningRect binding whenever this rectangle changes, or use the positioningRect binding so AppKit can re-position the popover when appropriate.
     */
    positioningRect(): CGRect;
    setPositioningRect$(value: CGRect): void;
    /**
     * If `YES`, the `contentViewController`'s view will extend into the chevron region of the popover. That view's `safeAreaInsets` will be adjusted accordingly such that anchoring any subviews to its `safeAreaLayoutGuide` will result in constraining to the unclipped content area of the popover. The default value for this property is `NO`. The full size content will extend to the containing window's frame, along all edges. Anything outside the popover will be clipped. -------------------------* *-------------------------* *-------------------------* *-------------------------* | /\ | | | | | | | | /-------- ---------\ | | /-------------------\ | | /-------------------\ | | /-------------------\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > | | < | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | \-------------------/ | | \-------- ---------/ | | \-------------------/ | | \-------------------/ | | | | \/ | | | | | -------------------------* *-------------------------* *-------------------------* *-------------------------*
     */
    hasFullSizeContent(): boolean;
    setHasFullSizeContent$(value: boolean): void;
}
export interface _NSPopover extends _NSAccessibility {
}
