import type { NobjcObject } from "objc-js";
import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { _NSSet } from "../Foundation/NSSet.js";
import type { _NSURL } from "../Foundation/NSURL.js";
import type { _WKWebExtension } from "./WKWebExtension.js";
import type { _WKWebExtensionContext } from "./WKWebExtensionContext.js";
import type { _WKWebExtensionControllerConfiguration } from "./WKWebExtensionControllerConfiguration.js";
import type { _WKWebExtensionControllerDelegate } from "./WKWebExtensionControllerDelegate.js";
import type { _WKWebExtensionDataRecord } from "./WKWebExtensionDataRecord.js";
import type { _WKWebExtensionTab } from "./WKWebExtensionTab.js";
import type { _WKWebExtensionWindow } from "./WKWebExtensionWindow.js";
import type { WKWebExtensionTabChangedProperties } from "./WKWebExtensionTabChangedProperties.js";
export declare class _WKWebExtensionController extends _NSObject {
    static alloc(): _WKWebExtensionController;
    static new(): _WKWebExtensionController;
    /** Returns a set of all available extension data types. */
    static allExtensionDataTypes(): _NSSet;
    /**
     * Returns a web extension controller initialized with the default configuration. An initialized web extension controller, or nil if the object could not be initialized. This is a designated initializer. You can use ``initWithConfiguration:`` to initialize an instance with a configuration. initWithConfiguration:
     */
    init(): _WKWebExtensionController;
    /**
     * Returns a web extension controller initialized with the specified configuration. The configuration for the new web extension controller. An initialized web extension controller, or nil if the object could not be initialized. This is a designated initializer. You can use ``init:`` to initialize an instance with the default configuration. The initializer copies the specified configuration, so mutating the configuration after invoking the initializer has no effect on the web extension controller. init
     */
    initWithConfiguration$(configuration: _WKWebExtensionControllerConfiguration): _WKWebExtensionController;
    /**
     * Loads the specified extension context. Causes the context to start, loading any background content, and injecting any content into relevant tabs. Set to or an instance if an error occurred. A Boolean value indicating if the context was successfully loaded. loadExtensionContext:
     */
    loadExtensionContext$error$(extensionContext: _WKWebExtensionContext, error: NobjcObject | null): boolean;
    /**
     * Unloads the specified extension context. Causes the context to stop running. Set to or an instance if an error occurred. A Boolean value indicating if the context was successfully unloaded. unloadExtensionContext:
     */
    unloadExtensionContext$error$(extensionContext: _WKWebExtensionContext, error: NobjcObject | null): boolean;
    /**
     * Returns a loaded extension context for the specified extension. An extension to lookup. An extension context or `nil` if no match was found. extensions
     */
    extensionContextForExtension$(extension: _WKWebExtension): _WKWebExtensionContext | null;
    /**
     * Returns a loaded extension context matching the specified URL. The URL to lookup. An extension context or `nil` if no match was found. This method is useful for determining the extension context to use when about to navigate to an extension URL. For example, you could use this method to retrieve the appropriate extension context and then use its ``webViewConfiguration`` property to configure a web view for loading that URL.
     */
    extensionContextForURL$(URL: _NSURL): _WKWebExtensionContext | null;
    /**
     * Fetches data records containing the given extension data types for all known extensions. The extension data types to fetch records for. A block to invoke when the data records have been fetched. The extension does not need to be loaded to be included in the result.
     */
    fetchDataRecordsOfTypes$completionHandler$(dataTypes: _NSSet, completionHandler: (arg0: _NSArray) => void): void;
    /**
     * Fetches a data record containing the given extension data types for a specific known web extension context. The extension data types to fetch records for. The specific web extension context to fetch records for. A block to invoke when the data record has been fetched. The extension does not need to be loaded to be included in the result.
     */
    fetchDataRecordOfTypes$forExtensionContext$completionHandler$(dataTypes: _NSSet, extensionContext: _WKWebExtensionContext, completionHandler: ((arg0: _WKWebExtensionDataRecord) => void) | null): void;
    /**
     * Removes extension data of the given types for the given data records. The extension data types that should be removed. The extension data records to delete data from. A block to invoke when the data has been removed.
     */
    removeDataOfTypes$fromDataRecords$completionHandler$(dataTypes: _NSSet, dataRecords: _NSArray, completionHandler: () => void): void;
    /**
     * Should be called by the app when a new window is opened to fire appropriate events with all loaded web extensions. The newly opened window. This method informs all loaded extensions of the opening of a new window, ensuring consistent understanding across extensions. If the intention is to inform only a specific extension, you should use the respective method on that extension's context instead. didCloseWindow:
     */
    didOpenWindow$(newWindow: _WKWebExtensionWindow): void;
    /**
     * Should be called by the app when a window is closed to fire appropriate events with all loaded web extensions. The window that was closed. This method informs all loaded extensions of the closure of a window, ensuring consistent understanding across extensions. If the intention is to inform only a specific extension, you should use the respective method on that extension's context instead. didOpenWindow:
     */
    didCloseWindow$(closedWindow: _WKWebExtensionWindow): void;
    /**
     * Should be called by the app when a window gains focus to fire appropriate events with all loaded web extensions. The window that gained focus, or if no window has focus or a window has focus that is not visible to extensions. This method informs all loaded extensions of the focused window, ensuring consistent understanding across extensions. If the intention is to inform only a specific extension, you should use the respective method on that extension's context instead.
     */
    didFocusWindow$(focusedWindow: _WKWebExtensionWindow | null): void;
    /**
     * Should be called by the app when a new tab is opened to fire appropriate events with all loaded web extensions. The newly opened tab. This method informs all loaded extensions of the opening of a new tab, ensuring consistent understanding across extensions. If the intention is to inform only a specific extension, you should use the respective method on that extension's context instead. didCloseTab:
     */
    didOpenTab$(newTab: _WKWebExtensionTab): void;
    /**
     * Should be called by the app when a tab is closed to fire appropriate events with all loaded web extensions. The tab that was closed. A boolean value indicating whether the window containing the tab is also closing. This method informs all loaded extensions of the closing of a tab, ensuring consistent understanding across extensions. If the intention is to inform only a specific extension, you should use the respective method on that extension's context instead. didOpenTab:
     */
    didCloseTab$windowIsClosing$(closedTab: _WKWebExtensionTab, windowIsClosing: boolean): void;
    /**
     * Should be called by the app when a tab is activated to notify all loaded web extensions. The tab that has become active. The tab that was active before. This parameter can be if there was no previously active tab. This method informs all loaded extensions of the tab activation, ensuring consistent state awareness across extensions. If the intention is to inform only a specific extension, use the respective method on that extension's context instead.
     */
    didActivateTab$previousActiveTab$(activatedTab: _WKWebExtensionTab, previousTab: _WKWebExtensionTab | null): void;
    /**
     * Should be called by the app when tabs are selected to fire appropriate events with all loaded web extensions. The set of tabs that were selected. This method informs all loaded extensions that tabs have been selected, ensuring consistent understanding across extensions. If the intention is to inform only a specific extension, you should use the respective method on that extension's context instead.
     */
    didSelectTabs$(selectedTabs: _NSArray): void;
    /**
     * Should be called by the app when tabs are deselected to fire appropriate events with all loaded web extensions. The set of tabs that were deselected. This method informs all loaded extensions that tabs have been deselected, ensuring consistent understanding across extensions. If the intention is to inform only a specific extension, you should use the respective method on that extension's context instead.
     */
    didDeselectTabs$(deselectedTabs: _NSArray): void;
    /**
     * Should be called by the app when a tab is moved to fire appropriate events with all loaded web extensions. The tab that was moved. The old index of the tab within the window. The window that the tab was moved from, or if the tab is moving from no open window. This method informs all loaded extensions of the movement of a tab, ensuring consistent understanding across extensions. If the window is staying the same, the current window should be specified. If the intention is to inform only a specific extension, use the respective method on that extension's context instead.
     */
    didMoveTab$fromIndex$inWindow$(movedTab: _WKWebExtensionTab, index: number, oldWindow: _WKWebExtensionWindow | null): void;
    /**
     * Should be called by the app when a tab is replaced by another tab to fire appropriate events with all loaded web extensions. The tab that was replaced. The tab that replaced the old tab. This method informs all loaded extensions of the replacement of a tab, ensuring consistent understanding across extensions. If the intention is to inform only a specific extension, you should use the respective method on that extension's context instead.
     */
    didReplaceTab$withTab$(oldTab: _WKWebExtensionTab, newTab: _WKWebExtensionTab): void;
    /**
     * Should be called by the app when the properties of a tab are changed to fire appropriate events with all loaded web extensions. The properties of the tab that were changed. The tab whose properties were changed. This method informs all loaded extensions of changes to tab properties, ensuring a unified understanding across extensions. If the intention is to inform only a specific extension, you should use the respective method on that extension's context instead.
     */
    didChangeTabProperties$forTab$(properties: WKWebExtensionTabChangedProperties, changedTab: _WKWebExtensionTab): void;
    /** The extension controller delegate. */
    delegate(): _WKWebExtensionControllerDelegate | null;
    setDelegate$(value: _WKWebExtensionControllerDelegate | null): void;
    /**
     * A copy of the configuration with which the web extension controller was initialized. Mutating the configuration has no effect on the web extension controller.
     */
    configuration(): _WKWebExtensionControllerConfiguration;
    /** A set of all the currently loaded extensions. extensionContexts */
    extensions(): _NSSet;
    /** A set of all the currently loaded extension contexts. extensions */
    extensionContexts(): _NSSet;
}
