import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSData } from "../Foundation/NSData.js";
import type { _NSMutableURLRequest } from "../Foundation/NSMutableURLRequest.js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { _NSString } from "../Foundation/NSString.js";
import type { _NSURL } from "../Foundation/NSURL.js";
import type { _NSURLRequest } from "../Foundation/NSURLRequest.js";
import type { _NSURLResponse } from "../Foundation/NSURLResponse.js";
import type { _WebArchive } from "./WebArchive.js";
import type { _WebDocumentRepresentation } from "./WebDocumentRepresentation.js";
import type { _WebFrame } from "./WebFrame.js";
import type { _WebResource } from "./WebResource.js";
export declare class _WebDataSource extends _NSObject {
    static alloc(): _WebDataSource;
    static new(): _WebDataSource;
    init(): _WebDataSource;
    /**
     * @method initWithRequest: @abstract The designated initializer for WebDataSource. @param request The request to use in creating a datasource. @result Returns an initialized WebDataSource.
     */
    initWithRequest$(request: _NSURLRequest): _WebDataSource;
    /**
     * method subresourceForURL: @abstract Returns a subresource for a given URL. @param URL The URL of the subresource. @description Returns non-nil if the data source has fully downloaded a subresource with the given URL.
     */
    subresourceForURL$(URL: _NSURL): _WebResource;
    /**
     * @method addSubresource: @abstract Adds a subresource to the data source. @param subresource The subresource to be added. @description addSubresource: adds a subresource to the data source's list of subresources. Later, if something causes the data source to load the URL of the subresource, the data source will load the data from the subresource instead of from the network. For example, if one wants to add an image that is already downloaded to a web page, addSubresource: can be called so that the data source uses the downloaded image rather than accessing the network. NOTE: If the data source already has a subresource with the same URL, addSubresource: will replace it.
     */
    addSubresource$(subresource: _WebResource): void;
    /**
     * @property data @abstract Returns the raw data associated with the datasource. Returns nil if the datasource hasn't loaded any data. @discussion The data will be incomplete until the datasource has completely loaded.
     */
    data(): _NSData;
    /**
     * @property representation @abstract The representation associated with this datasource. Returns nil if the datasource hasn't created its representation. @discussion A representation holds a type specific representation of the datasource's data. The representation class is determined by mapping a MIME type to a class. The representation is created once the MIME type of the datasource content has been determined.
     */
    representation(): _WebDocumentRepresentation;
    /** @property webFrame @abstract The frame that represents this data source. */
    webFrame(): _WebFrame;
    /**
     * @property initialRequest @abstract A reference to the original request that created the datasource. This request will be unmodified by WebKit.
     */
    initialRequest(): _NSURLRequest;
    /**
     * @property request @abstract The request that was used to create this datasource.
     */
    request(): _NSMutableURLRequest;
    /** @property response @abstract The NSURLResponse for the data source. */
    response(): _NSURLResponse;
    /**
     * @property textEncodingName @abstract Returns either the override encoding, as set on the WebView for this dataSource or the encoding from the response.
     */
    textEncodingName(): _NSString;
    /** @property isLoading @abstract Returns YES if there are any pending loads. */
    loading(): boolean;
    /** @property pageTitle @abstract The page title or nil. */
    pageTitle(): _NSString;
    /**
     * @property unreachableURL @abstract The unreachableURL for which this dataSource is showing alternate content, or nil. @discussion This will be non-nil only for dataSources created by calls to the WebFrame method loadAlternateHTMLString:baseURL:forUnreachableURL:.
     */
    unreachableURL(): _NSURL;
    /**
     * @property webArchive @abstract A WebArchive representing the data source, its subresources and child frames. @description This method constructs a WebArchive using the original downloaded data. In the case of HTML, if the current state of the document is preferred, webArchive should be called on the DOM document instead.
     */
    webArchive(): _WebArchive;
    /**
     * @property mainResource @abstract A WebResource representing the data source. @description This method constructs a WebResource using the original downloaded data. This method can be used to construct a WebArchive in case the archive returned by WebDataSource's webArchive isn't sufficient.
     */
    mainResource(): _WebResource;
    /**
     * @property subresources @abstract All the subresources associated with the data source. @description The returned array only contains subresources that have fully downloaded.
     */
    subresources(): _NSArray;
}
