import type { NobjcObject } from "objc-js";
import type { _WKFrameInfo } from "./WKFrameInfo.js";
import type { _WKNavigationAction } from "./WKNavigationAction.js";
import type { _WKOpenPanelParameters } from "./WKOpenPanelParameters.js";
import type { _WKSecurityOrigin } from "./WKSecurityOrigin.js";
import type { _WKWebView } from "./WKWebView.js";
import type { _WKWebViewConfiguration } from "./WKWebViewConfiguration.js";
import type { _WKWindowFeatures } from "./WKWindowFeatures.js";
import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSString } from "../Foundation/NSString.js";
import type { WKMediaCaptureType } from "./WKMediaCaptureType.js";
import type { WKPermissionDecision } from "./WKPermissionDecision.js";
export interface _WKUIDelegate {
    /**
     * Creates a new web view. The web view invoking the delegate method. The configuration to use when creating the new web view. This configuration is a copy of webView.configuration. The navigation action causing the new web view to be created. Window features requested by the webpage. A new web view or nil. The web view returned must be created with the specified configuration. WebKit will load the request in the returned web view. If you do not implement this method, the web view will cancel the navigation.
     */
    webView$createWebViewWithConfiguration$forNavigationAction$windowFeatures$?(webView: _WKWebView, configuration: _WKWebViewConfiguration, navigationAction: _WKNavigationAction, windowFeatures: _WKWindowFeatures): _WKWebView | null;
    /**
     * Notifies your app that the DOM window object's close() method completed successfully. The web view invoking the delegate method. Your app should remove the web view from the view hierarchy and update the UI as needed, such as by closing the containing browser tab or window.
     */
    webViewDidClose$?(webView: _WKWebView): void;
    /**
     * Displays a JavaScript alert panel. The web view invoking the delegate method. The message to display. Information about the frame whose JavaScript initiated this call. The completion handler to call after the alert panel has been dismissed. For user security, your app should call attention to the fact that a specific website controls the content in this panel. A simple forumla for identifying the controlling website is frame.request.URL.host. The panel should have a single OK button. If you do not implement this method, the web view will behave as if the user selected the OK button.
     */
    webView$runJavaScriptAlertPanelWithMessage$initiatedByFrame$completionHandler$?(webView: _WKWebView, message: _NSString, frame: _WKFrameInfo, completionHandler: () => NobjcObject): void;
    /**
     * Displays a JavaScript confirm panel. The web view invoking the delegate method. The message to display. Information about the frame whose JavaScript initiated this call. The completion handler to call after the confirm panel has been dismissed. Pass YES if the user chose OK, NO if the user chose Cancel. For user security, your app should call attention to the fact that a specific website controls the content in this panel. A simple forumla for identifying the controlling website is frame.request.URL.host. The panel should have two buttons, such as OK and Cancel. If you do not implement this method, the web view will behave as if the user selected the Cancel button.
     */
    webView$runJavaScriptConfirmPanelWithMessage$initiatedByFrame$completionHandler$?(webView: _WKWebView, message: _NSString, frame: _WKFrameInfo, completionHandler: (result: boolean) => NobjcObject): void;
    /**
     * Displays a JavaScript text input panel. The web view invoking the delegate method. The prompt to display. The initial text to display in the text entry field. Information about the frame whose JavaScript initiated this call. The completion handler to call after the text input panel has been dismissed. Pass the entered text if the user chose OK, otherwise nil. For user security, your app should call attention to the fact that a specific website controls the content in this panel. A simple forumla for identifying the controlling website is frame.request.URL.host. The panel should have two buttons, such as OK and Cancel, and a field in which to enter text. If you do not implement this method, the web view will behave as if the user selected the Cancel button.
     */
    webView$runJavaScriptTextInputPanelWithPrompt$defaultText$initiatedByFrame$completionHandler$?(webView: _WKWebView, prompt: _NSString, defaultText: _NSString | null, frame: _WKFrameInfo, completionHandler: ((result: _NSString) => NobjcObject) | null): void;
    /**
     * A delegate to request permission for microphone audio and camera video access. The web view invoking the delegate method. The origin of the page. Information about the frame whose JavaScript initiated this call. The type of capture (camera, microphone). The completion handler to call once the decision is made If not implemented, the result is the same as calling the decisionHandler with WKPermissionDecisionPrompt.
     */
    webView$requestMediaCapturePermissionForOrigin$initiatedByFrame$type$decisionHandler$?(webView: _WKWebView, origin: _WKSecurityOrigin, frame: _WKFrameInfo, type: WKMediaCaptureType, decisionHandler: (decision: WKPermissionDecision) => NobjcObject): void;
    /**
     * Allows your app to determine whether or not the given security origin should have access to the device's orientation and motion. The security origin which requested access to the device's orientation and motion. The frame that initiated the request. The decision handler to call once the app has made its decision.
     */
    webView$requestDeviceOrientationAndMotionPermissionForOrigin$initiatedByFrame$decisionHandler$?(webView: _WKWebView, origin: _WKSecurityOrigin, frame: _WKFrameInfo, decisionHandler: (decision: WKPermissionDecision) => NobjcObject): void;
    /**
     * Displays a file upload panel. The web view invoking the delegate method. Parameters describing the file upload control. Information about the frame whose file upload control initiated this call. The completion handler to call after open panel has been dismissed. Pass the selected URLs if the user chose OK, otherwise nil. If you do not implement this method on macOS, the web view will behave as if the user selected the Cancel button. If you do not implement this method on iOS or visionOS, the web view will match the file upload behavior of Safari. If you desire the web view to act as if the user selected the Cancel button on iOS or visionOS, immediately call the completion handler with nil.
     */
    webView$runOpenPanelWithParameters$initiatedByFrame$completionHandler$?(webView: _WKWebView, parameters: _WKOpenPanelParameters, frame: _WKFrameInfo, completionHandler: ((URLs: _NSArray) => NobjcObject) | null): void;
}
