import type { NobjcObject } from "objc-js";
import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSError } from "../Foundation/NSError.js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { _NSString } from "../Foundation/NSString.js";
import type { _NSAlertDelegate } from "./NSAlertDelegate.js";
import type { _NSButton } from "./NSButton.js";
import type { _NSImage } from "./NSImage.js";
import type { _NSView } from "./NSView.js";
import type { _NSWindow } from "./NSWindow.js";
import type { NSAlertStyle } from "./NSAlertStyle.js";
export declare class _NSAlert extends _NSObject {
    static alloc(): _NSAlert;
    static new(): _NSAlert;
    init(): _NSAlert;
    /**
     * Returns an alert initialized from information in an error object. - Parameter error: Error information to display. - Returns: An initialized alert. - Note: The `NSAlert` class extracts the localized error description, recovery suggestion, and recovery options from the error parameter and uses them as the alert’s message text, informative text, and button titles, respectively.
     */
    static alertWithError$(error: _NSError): _NSAlert;
    /**
     * This was intended for use by apps migrating from the C-based API. This uses alternate return codes that were compatible with this C-based API, but not with modern alerts, see NSAlertDefaultReturn, etc. in NSPanel.h Alerts should be created with the -init method and setting properties.
     * @deprecated Use -init instead
     */
    static alertWithMessageText$defaultButton$alternateButton$otherButton$informativeTextWithFormat$(message: _NSString | null, defaultButton: _NSString | null, alternateButton: _NSString | null, otherButton: _NSString | null, format: _NSString): _NSAlert;
    /**
     * Adds a button with a given title to the alert. Buttons should be added from most-to-least prominent. The exact visual arrangement of the buttons is determined by `NSAlert` internally. In general, they are arranged from trailing-to-leading edge when laid out horizontally, and top-to-bottom when laid out vertically, with some exceptions for buttons like “Cancel”. The first three buttons are identified by the order in which they are added (not the order in which they may appear visually) as `NSAlertFirstButtonReturn`, `NSAlertSecondButtonReturn`, `NSAlertThirdButtonReturn` in the return-code parameter. Subsequent buttons are identified as `NSAlertThirdButtonReturn` + *n*, where *n* is an integer. By default, the first button has a key equivalent of Return, any button with a title of “Cancel” has a key equivalent of Escape, and any button with the title “Don’t Save” has a key equivalent of Command-D (but only if it’s not the first button). You can also assign different key equivalents for the buttons using the `keyEquivalent` method of the `NSButton` class. In addition, you can use the `tag` property of the `NSButton` class to set the alert presentation’s return-code. The framework reserves the use of the button’s `target` and `action`. - Parameter title: Title of the button to add to the alert. - Returns: The button that was added to the alert.
     */
    addButtonWithTitle$(title: _NSString): _NSButton;
    /**
     * Specifies that the alert must do immediate layout instead of lazily just before display. Used to indicate that the alert panel should do immediate layout, overriding the default behavior of laying out lazily just before showing panel. Only call this method if wanting to do custom layout after it returns. Call this method only after the alert’s other customization, including setting message and informative text, and adding buttons and an accessory view if needed. Layout changes can be made after this method returns, in particular to adjust the frame of an accessory view. Note that the standard layout of the alert may change in the future, so layout customization should be done with caution.
     */
    layout(): void;
    /**
     * Runs the alert as an app-modal dialog and returns the constant that identifies the button clicked.
     */
    runModal(): number;
    /**
     * Runs the alert modally as a sheet attached to the specified window. - Parameters: - sheetWindow: The window on which to display the sheet. - handler: The completion handler that gets called when the sheet’s modal session ends. This method uses the `NSWindow` sheet methods to display the alert. If the alert has an alert style of `NSCriticalAlertStyle`, it is presented as a critical sheet, which means that it can display on top of other sheets that might already be attached to the window. Otherwise, it is presented--or queued for presentation--as a standard sheet. Note that `-orderOut:` no longer needs to be called in the completion handler. If the alert isn’t don’t dismiss the alert, it will be done for you after the completion handler finishes.
     */
    beginSheetModalForWindow$completionHandler$(sheetWindow: _NSWindow, handler: ((returnCode: number) => void) | null): void;
    /** @deprecated Use -beginSheetModalForWindow:completionHandler: instead */
    beginSheetModalForWindow$modalDelegate$didEndSelector$contextInfo$(window: _NSWindow, delegate: NobjcObject | null, didEndSelector: string | null, contextInfo: Uint8Array | null): void;
    /**
     * The text that is displayed prominently in the alert. - Note: Use this string to get the user’s attention and communicate the reason for displaying the alert.
     */
    messageText(): _NSString;
    setMessageText$(value: _NSString): void;
    /**
     * The descriptive text that provides more details about the reason for the alert. - Note: The informative text string is displayed below the message text and is less prominent. Use this string to provide additional context about the reason for the alert or about the actions that the user might take.
     */
    informativeText(): _NSString;
    setInformativeText$(value: _NSString): void;
    /**
     * The custom icon displayed in the alert. By default, the image used in an alert is the app icon. If you set this property’s value, your specified custom image is used in place of the app icon. If you’ve set a custom alert icon, you can clear it by setting this property’s value to `nil`, which restores use of the app icon for the alert. - Note: AppKit may omit the icon from the alert if it’s the app icon and the alert’s context is clear, such as being presented as a sheet on an app window.
     */
    icon(): _NSImage;
    setIcon$(value: _NSImage): void;
    /**
     * The array of response buttons for the alert. The buttons are in the order in which they were added, and do not necessarily reflect the order they are arranged visually. The array does not include the default “OK” button that is shown in an alert presented without any buttons added with `-addButtonWithTitle:`.
     */
    buttons(): _NSArray;
    /**
     * Indicates the alert’s severity level. See the `NSAlertStyle` enumeration for the list of alert style constants.
     */
    alertStyle(): NSAlertStyle;
    setAlertStyle$(value: NSAlertStyle): void;
    /**
     * Specifies whether the alert has a help button. Set this property’s value to `YES` to specify that the alert has a help button, or `NO` to specify it does not. When a user clicks an alert’s help button, the alert delegate (`delegate`) receives an `alertShowHelp:` message. The delegate is responsible for displaying the help information related to this particular alert. Clicking an alert’s help button can alternately cause the `-openHelpAnchor:inBook:` message to be sent to the app’s help manager with a `nil` book and the anchor specified by the `helpAnchor` property, if any of the following conditions are true: - There is no alert delegate. - The alert delegate does not implement `-alertShowHelp:`. - The alert delegate implements `-alertShowHelp:` but returns `NO`. When this is the case, an exception is raised if no help anchor is set.
     */
    showsHelp(): boolean;
    setShowsHelp$(value: boolean): void;
    /** The alert’s HTML help anchor used when the user clicks the alert’s help button */
    helpAnchor(): _NSString | null;
    setHelpAnchor$(value: _NSString | null): void;
    /**
     * The delegate of the receiver, currently only allows for custom help behavior of the alert. For apps linked against 10.12, this property has zeroing weak memory semantics. When linked against an older SDK this back to having `retain` semantics, matching legacy behavior.
     */
    delegate(): _NSAlertDelegate | null;
    setDelegate$(value: _NSAlertDelegate | null): void;
    /**
     * The accessory view displayed in the alert, placed between the informative text or suppression checkbox (if present) and the response buttons. Before changing the location of the accessory view, first call the `-layout` method.
     */
    accessoryView(): _NSView;
    setAccessoryView$(value: _NSView): void;
    /**
     * Specifies whether the alert includes a suppression checkbox, which can be employed to allow a user to opt out of seeing the alert again. The default value of this property is `NO`, which specifies the absence of a suppression checkbox in the alert. Set the value to `YES` to show a suppression checkbox in the alert. By default, a suppression checkbox has the title, “Do not show this message again.” In macOS 11.0 and later, if the alert displays multiple buttons that prompt the user to make a choice, the title is “Do not ask again.” To customize it, use the checkbox’s title property, as follows: myAlert.suppressionButton.title = " Do not show this warning again"; To create an alert that responds to the selection state of the suppression checkbox, check `myAlert.suppressionButton.state`.
     */
    showsSuppressionButton(): boolean;
    setShowsSuppressionButton$(value: boolean): void;
    /**
     * The alert’s suppression checkbox. The checkbox may be customized, including the title and the initial state. Additionally, use this method to get the state of the button after the alert is dismissed, which may be stored in user defaults and checked before showing the alert again. In order to show the suppression button in the alert panel, you must set `showsSuppressionButton` to `YES`.
     */
    suppressionButton(): _NSButton;
    /** The app-modal panel or document-modal sheet that corresponds to the alert */
    window(): _NSWindow;
}
