import type { NobjcObject } from "objc-js";
import type { _NSResponder } from "./NSResponder.js";
import type { _NSSeguePerforming } from "./NSSeguePerforming.js";
import type { _NSStoryboard } from "./NSStoryboard.js";
import type { _NSUserInterfaceItemIdentification } from "./NSUserInterfaceItemIdentification.js";
import type { _NSView } from "./NSView.js";
import type { _NSViewControllerPresentationAnimator } from "./NSViewControllerPresentationAnimator.js";
import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSBundle } from "../Foundation/NSBundle.js";
import type { _NSCoder } from "../Foundation/NSCoder.js";
import type { _NSExtensionContext } from "../Foundation/NSExtensionContext.js";
import type { _NSExtensionRequestHandling } from "../Foundation/NSExtensionRequestHandling.js";
import type { _NSString } from "../Foundation/NSString.js";
import type { CGPoint } from "../structs/CGPoint.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";
import type { NSViewControllerTransitionOptions } from "./NSViewControllerTransitionOptions.js";
export declare class _NSViewController extends _NSResponder {
    static alloc(): _NSViewController;
    static new(): _NSViewController;
    init(): _NSViewController;
    /**
     * The designated initializer. The specified nib should typically have the class of the file's owner set to NSViewController, or a subclass of yours, with the "view" outlet connected to a view. If you pass in a nil nib name then -nibName will return nil. -loadView can be used to assign a view before -view is invoked. If you pass in a nil bundle then -nibBundle will return nil and -loadView will interpret it using the same rules as -[NSNib initWithNibNamed:bundle:]. On 10.10 and higher, a nil nibName can be used, and NSViewController will automatically attempt to load a view with the same class name. See loadView for more information.
     */
    initWithNibName$bundle$(nibNameOrNil: _NSString | null, nibBundleOrNil: _NSBundle | null): _NSViewController;
    initWithCoder$(coder: _NSCoder): _NSViewController | null;
    /**
     * The default implementation of this method invokes [self nibName] and [self nibBundle] and then uses the NSNib class to load the nib with this object as the file's owner. If the "view" outlet of the file's owner in the nib is properly connected, the regular nib loading machinery will send this object a -setView: message. You can override this method to customize how nib loading is done, including merely adding new behavior immediately before or immediately after nib loading done by the default implementation. One can also use viewDidLoad to modify things after the view has been loaded. You should not invoke this method from other objects unless you take care to avoid redundant invocations; NSViewController's default implement can handle them but overrides in subclasses might not. (Typically other objects should instead invoke -view and let the view controller do whatever it takes to fulfill the request.) In general, you should not call this method, and let NSViewController call it when needed. If you need it called, simply call [viewController view]. Prior to 10.10, -loadView would not have well defined behavior if [self nibName] returned nil. On 10.10 and later, if nibName is nil, NSViewController will automatically try to load a nib with the same name as the classname. This allows a convenience of doing [[MyViewController alloc] init] (which has a nil nibName) and having it automatically load a nib with the name "MyViewController".
     */
    loadView(): void;
    /** If the view controller's view has not been loaded, loads the view. */
    loadViewIfNeeded(): void;
    /**
     * Conformance to KVB's NSEditor informal protocol. The default implementations of these methods pass on the message to each registered editor, which are typically controls in the nib that are bound to the nib file's owner. You can override these methods to customize what is done when your view's presentation to the user is about to end because, for example, the user has selected another of a set of views or hit a panel's OK button (committing time) or because the user has hit a panel's Cancel button (discarding time). This class also conforms to KVB's NSEditorRegistration protocol, but you're not encouraged to override those methods.
     */
    commitEditingWithDelegate$didCommitSelector$contextInfo$(delegate: NobjcObject | null, didCommitSelector: string | null, contextInfo: Uint8Array | null): void;
    commitEditing(): boolean;
    discardEditing(): void;
    /**
     * Called after the view has been loaded. For view controllers created in code, this is after -loadView. For view controllers unarchived from a nib, this is after the view is set. Default does nothing.
     */
    viewDidLoad(): void;
    /**
     * Called when the view is about to appear, meaning it is going from a state of being "hidden" or having a hidden ancestor, and/or not being in a window or being in a window that is ordered out, to a state where none of these conditions is true. Default does nothing. In general, it is good practice to call [super viewWillAppear] in case a superclass implements this method. Causing a view to become hidden or removed from its window, or causing its window to be ordered out, in response to -viewWillAppear is not recommended and may result in an exception being raised. When such responses are necessary, defer them to a future runloop cycle.
     */
    viewWillAppear(): void;
    /**
     * Called when the view has been fully transitioned onto the screen, meaning it is not "hidden", does not have a hidden ancestor, and is in a window that's ordered in. Default does nothing. In general, it is good practice to call [super viewDidAppear] in case a superclass implements this method.
     */
    viewDidAppear(): void;
    /**
     * Called when the view is about to disappear, meaning it is going from a state of not being "hidden", nor having a hidden ancestor, nor having a nil window or being in a window that's ordered out, to a state where at least one of these conditions is true. Default does nothing. In general, it is good practice to call [super viewWillDisappear] in case a superclass implements this method. Causing a view to become unhidden, or causing its window to be ordered in, in response to -viewWillDisappear is not recommended and may result in an exception being raised. When such responses are necessary, defer them to a future runloop cycle.
     */
    viewWillDisappear(): void;
    /**
     * Called after the view has been fully transitioned off the screen, meaning it is now "hidden" or has a hidden ancestor, or it not in a window, or is in a window that is ordered out. Default does nothing. In general, it is good practice to call [super viewDidDisappear] in case a superclass implements this method.
     */
    viewDidDisappear(): void;
    /**
     * The base implementation sends -updateConstraints to the view. When a view has a view controller, this message is sent to the view controller during the autolayout updateConstraints pass in lieu of sending updateConstraints directly to the view. You may override this method in a NSViewController subclass for updating custom constraints instead of subclassing your view and overriding -[NSView updateConstraints]. Overrides must call super or send -updateConstraints to the view. This method is only called for applications that link on 10.10 and higher.
     */
    updateViewConstraints(): void;
    /**
     * Called just before the view controller's view's layout method is invoked. Subclasses can implement as necessary. The default is a no-op.
     */
    viewWillLayout(): void;
    /**
     * Called just after the view controller's view's layout method is invoked. Subclasses can implement as necessary. The default is a no-op.
     */
    viewDidLayout(): void;
    /**
     * Presents the viewController with a specific animator that handles both the presentation and dismissal of the viewController. The animator is held onto until dismissViewController: is called. This is the fundamental primitive for displaying view controllers that block interaction in some way. The method will assert if animator is nil. In general, you will not directly call this method unless you have a custom animator. Instead, you will use one of the standard cover methods that provide the animator: [NSViewController presentViewControllerAsSheet:], [NSViewController presentViewControllerAsModalWindow:], [NSViewController presentViewController:asPopoverRelativeToRect:...]
     */
    presentViewController$animator$(viewController: _NSViewController, animator: _NSViewControllerPresentationAnimator): void;
    /**
     * Dismisses the viewController that was previously presented with the same animator that presented the viewController. This is the generic way to close a given viewController, no matter how it was presented.
     */
    dismissViewController$(viewController: _NSViewController): void;
    /**
     * Dismisses the receiver. If the receiver’s presenter is an NSViewController, it will be sent a -dismissViewController: message with this receiver as the parameter. Does nothing if the receiver is not currently presented.
     */
    dismissController$(sender: NobjcObject | null): void;
    /**
     * Presents the viewController as a sheet. The viewController is made the delegate and contentViewController of the sheet while it is shown. This method calls [self presentViewController:viewController animator:] with an animator that controls the sheet animation. Call [presentingViewController dismissViewController:viewController] to close the viewController that was previously shown as a sheet.
     */
    presentViewControllerAsSheet$(viewController: _NSViewController): void;
    /**
     * Presents the viewController as a modal window (also known as an alert). The viewController is made the delegate and contentViewController of the window while it is shown. NSWindow delegate methods can be used to prevent closing of the window (if needed). This method calls [self presentViewController:viewController animator:] with an animator that controls the displaying of the window. Call [presentingViewController dismissViewController:viewController] to close the viewController that was previously shown as a modal window.
     */
    presentViewControllerAsModalWindow$(viewController: _NSViewController): void;
    /**
     * Presents the viewController as a popover. The viewController is made the delegate and contentViewController of the popover while it is shown. NSPopover delegate methods can be used to customize the popover. This method calls [self presentViewController:viewController animator:] with an animator that controls the displaying of the popover. Call [presentingViewController dismissViewController:viewController] to close the viewController that was previously shown as a popover.
     */
    presentViewController$asPopoverRelativeToRect$ofView$preferredEdge$behavior$(viewController: _NSViewController, positioningRect: CGRect, positioningView: _NSView, preferredEdge: NSRectEdge, behavior: NSPopoverBehavior): void;
    /**
     * This is the same as `presentViewController:asPopoverRelativeToRect:ofView:preferredEdge:behavior:`, except that it allows for configuring whether the popover has full size content or not.
     */
    presentViewController$asPopoverRelativeToRect$ofView$preferredEdge$behavior$hasFullSizeContent$(viewController: _NSViewController, positioningRect: CGRect, positioningView: _NSView, preferredEdge: NSRectEdge, behavior: NSPopoverBehavior, hasFullSizeContent: boolean): void;
    /**
     * This method can be used to transition between sibling child view controllers. The receiver of this method is their common parent view controller. (Use [NSViewController addChildViewController:] to create the parent/child relationship.) This method will add the toViewController's view to the superview of the fromViewController's view. The fromViewController's view will be removed from the parent at the appropriate time. It is important to allow this method to add and remove the views. This method will throw an exception/assertion if the parent view controllers are not the same as the receiver, or if fromViewController.view does not have a superview.
     */
    transitionFromViewController$toViewController$options$completionHandler$(fromViewController: _NSViewController, toViewController: _NSViewController, options: NSViewControllerTransitionOptions, completion: (() => void) | null): void;
    /**
     * A convenience method for adding a child view controller; this simply calls insertChildViewController:atIndex: at the end of the array.
     */
    addChildViewController$(childViewController: _NSViewController): void;
    /**
     * Removes the child controller from this parent controller. This method simply calls [self.parentViewController removeChildViewControllerAtIndex:index] with the appropriate index in the array.
     */
    removeFromParentViewController(): void;
    /**
     * Primitive method to insert a child view controller in the childViewControllers array. If the child controller has a different parent controller, it will first be removed from its current parent by calling [childViewController removeFromParentViewController]. If this method is overridden then the super implementation should be called. This is the primitive to override for performing insert operations in a container class, and has little value in itself if the parent doesn't do something with the children.
     */
    insertChildViewController$atIndex$(childViewController: _NSViewController, index: number): void;
    /**
     * Primitive method to remove a child view controller in the childViewControllers array. This method can be overridden to do additional work when a child is removed. If it is overridden, then the super implementation should be called. This is the primitive to override for performing insert operations in a container class, and has little value in itself if the parent doesn't do something with the children.
     */
    removeChildViewControllerAtIndex$(index: number): void;
    /**
     * Sent to a view controller when the `preferredContentSize` property of one of its child or presented view controllers changes.
     */
    preferredContentSizeDidChangeForViewController$(viewController: _NSViewController): void;
    /**
     * Sent to a service view controller when its view is about to be resized. Override this, if desired, to perform relayout in response to the resize, potentially in an animated way.
     */
    viewWillTransitionToSize$(newSize: CGSize): void;
    /**
     * Return the name of the nib to be loaded to instantiate the view. The default implementation returns whatever value was passed to the initializer.
     */
    nibName(): _NSString | null;
    /**
     * Return the bundle that the nib will be loaded from. The default implementation returns whatever value was passed to the initializer.
     */
    nibBundle(): _NSBundle | null;
    /**
     * The object whose value is being presented in the view. The default implementation of -setRepresentedObject: doesn't copy the passed-in object, it retains it. (In another words, "representedObject" is a to-one relationship, not an attribute.) This class is key-value coding and key-value observing compliant for "representedObject" so when you use it as the file's owner of a view's nib you can bind controls to the file's owner using key paths that start with "representedObject."
     */
    representedObject(): NobjcObject | null;
    setRepresentedObject$(value: NobjcObject | null): void;
    /**
     * The localized title of the view. This class doesn't actually do anything with the value of this property other than hold onto it, and be KVC and KVO compliant for "title." The default implementation of -setTitle: copies the passed-in object ("title" is an attribute). This property is here because so many anticipated uses of this class will involve letting the user choose among multiple named views using a pulldown menu or something like that.
     */
    title(): _NSString | null;
    setTitle$(value: _NSString | null): void;
    /**
     * The default implementation of the getter first invokes [self loadView] if the view hasn't been set yet. After -loadView is called, -viewDidLoad will be called. The setter can be used to assign a view that's created in a different manner than what -view's default implementation would do.
     */
    view(): _NSView;
    setView$(value: _NSView): void;
    /** Returns the view controller's view, or nil if the view has not been loaded. */
    viewIfLoaded(): _NSView;
    /** Returns whether the view has been loaded or not. */
    viewLoaded(): boolean;
    /**
     * Expresses the view's desired size. May be consulted by a parent ViewController when performing layout.
     */
    preferredContentSize(): CGSize;
    setPreferredContentSize$(value: CGSize): void;
    /**
     * The view controllers that were presented by this view controller. In other words, 'self' displayed each of the items in the array. This is a one-to-many relationship.
     */
    presentedViewControllers(): _NSArray;
    /**
     * The view controller that presented this view controller (or its farthest ancestor). In other words, 'presentingViewController' is the one that displayed 'self' to screen.
     */
    presentingViewController(): _NSViewController;
    /**
     * Returns the ancestor of this view controller. Can return nil if this is the contentViewController, or there is no parent for the given view controller.
     */
    parentViewController(): _NSViewController;
    /**
     * An array of children view controllers. Assignment of the array filters all additions and removals through the insert and remove API below.
     */
    childViewControllers(): _NSArray;
    setChildViewControllers$(value: _NSArray): void;
    /**
     * The Storyboard the ViewController was loaded from. Returns nil if the ViewController was not loaded from a Storyboard.
     */
    storyboard(): _NSStoryboard;
    /**
     * Returns the extension context. Also acts as a convenience method for a view controller to check if it participating in an extension request.
     */
    extensionContext(): _NSExtensionContext;
    /**
     * For services that vend UI. Identifies the view (if any) in the service’s UI that displays the source image. Defaults to nil. When your service loads its UI (or in your service UI's xib file), you can set this to point to an image view, or some containing border view, that’s a descendant of the ViewController’s view. Doing so helps the system to position and animate the service’s UI with respect to the source item representation. If your service UI doesn't display the source item at its original screen position and size, leave this set to nil.
     */
    sourceItemView(): _NSView;
    setSourceItemView$(value: _NSView): void;
    /**
     * For services that vend UI. Set this to position the service UI's lower-left corner in screen space. (Use the `preferredContentSize` property to specify the service UI's desired size, in screen units.)
     */
    preferredScreenOrigin(): CGPoint;
    setPreferredScreenOrigin$(value: CGPoint): void;
    /**
     * For services that vend UI. Expresses the smallest allowable size for the service’s root view, in screen units. A service should return the minimum dimensions its root view can accommodate, based on the items the service has been sent. This defaults to a small but non-empty size.
     */
    preferredMinimumSize(): CGSize;
    /**
     * For services that vend UI. Expresses the largest allowable size for the service’s root view, in screen units. A service should return the maximum dimensions that are potentially useful for its root view, based on the items the service has been sent. This defaults to a large or infinite size.
     */
    preferredMaximumSize(): CGSize;
}
export interface _NSViewController extends _NSSeguePerforming, _NSUserInterfaceItemIdentification, _NSExtensionRequestHandling {
}
