import type { NobjcObject } from "objc-js";
import type { _NSData } from "../Foundation/NSData.js";
import type { _NSError } from "../Foundation/NSError.js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { _NSSet } from "../Foundation/NSSet.js";
import type { _NSString } from "../Foundation/NSString.js";
import type { _NSURL } from "../Foundation/NSURL.js";
import type { _BAAssetPack } from "./BAAssetPack.js";
import type { _BAManagedAssetPackDownloadDelegate } from "./BAManagedAssetPackDownloadDelegate.js";
import type { BAAssetPackStatus } from "./BAAssetPackStatus.js";
import type { NSDataReadingOptions } from "../Foundation/NSDataReadingOptions.js";
export declare class _BAAssetPackManager extends _NSObject {
    static alloc(): _BAAssetPackManager;
    static new(): _BAAssetPackManager;
    init(): _BAAssetPackManager;
    /** The shared asset-pack manager. */
    static sharedManager(): _BAAssetPackManager;
    /**
     * Gets the asset packs that are available to download. This method might attempt to get the latest asset-pack information from the server. - Parameter completionHandler: A block that receives the asset packs or an error if one occurs.
     */
    getAllAssetPacksWithCompletionHandler$(completionHandler: ((assetPacks: _NSSet, error: _NSError) => void) | null): void;
    /**
     * Gets the asset pack with the given identifier. If no asset pack with the given identifier is found, then the block will receive an `NSError` object with ``BAManagedErrorCode/BAManagedErrorCodeAssetPackNotFound`` as its code for the `error` parameter. This method might attempt to get the latest asset-pack information from the server. - Parameters: - assetPackIdentifier: The asset pack’s identifier. - completionHandler: A block that receives the asset pack or an error if one occurs.
     */
    getAssetPackWithIdentifier$completionHandler$(assetPackIdentifier: _NSString, completionHandler: ((assetPack: _BAAssetPack, error: _NSError) => void) | null): void;
    /**
     * Gets the status of the asset pack with the specified identifier. If no asset pack with the specified identifier is found, then the block will receive an `NSError` object with ``BAManagedErrorCode/BAManagedErrorCodeAssetPackNotFound`` as its code for the `error` parameter. This method attempts to get the latest asset-pack information from the server. No updates or removals are automatically triggered. - Parameters: - assetPackIdentifier: The asset pack’s identifier. - completionHandler: A block that receives the status of the asset pack or an error if one occurs.
     */
    getStatusOfAssetPackWithIdentifier$completionHandler$(assetPackIdentifier: _NSString, completionHandler: ((status: BAAssetPackStatus, error: _NSError) => void) | null): void;
    /**
     * Ensures that the specified asset pack be available locally. This method checks if the asset pack is currently downloaded. If it isn’t, then it schedules it to be downloaded and calls the block with `nil` for the block’s `error` parameter when the download completes. It’s guaranteed that the requested asset pack will be available locally once the block is called with `nil` for its `error` parameter. If a non-`nil` value is provided to the block’s `error` parameter, then the asset pack is **not** guaranteed to be available locally. You can optionally monitor download progress by attaching a delegate object to `delegate`. - Parameters: - assetPack: The asset pack the local availability of which to ensure. - completionHandler: A block that’s called when the asset pack is available locally or that receives an error if one occurs.
     */
    ensureLocalAvailabilityOfAssetPack$completionHandler$(assetPack: _BAAssetPack, completionHandler: ((error: _NSError) => void) | null): void;
    /**
     * Gets the latest asset-pack information from the server, updates outdated asset packs, and removes obsolete asset packs. - Parameter completionHandler: A block that receives a set of identifiers of asset packs that are being updated and a set of identifiers of removed asset packs or an error if one occurs.
     */
    checkForUpdatesWithCompletionHandler$(completionHandler: ((updatingIdentifiers: _NSSet, removedIdentifiers: _NSSet, error: _NSError) => void) | null): void;
    /**
     * Returns the contents of an asset file at the specified relative path. All asset packs share the same namespace, so you can treat the overall collection of downloaded asset packs as if it were a single root directory that contains all of your subdirectories and asset files, regardless of the specific asset pack in which any particular file resides. If there’s a file-path collision across multiple asset packs, then it’s undefined from which asset pack the file will be read unless you explicitly limit the search to a particular asset pack by passing a non-`nil` identifier to the `assetPackIdentifier` parameter. - Parameters: - path: The relative file path. - assetPackIdentifier: The identifier of the asset pack in which you want to search for the file or `nil` if you want to search in all asset packs. - options: Options for how to read the contents of the file into a data object. - error: A pointer to an error that will be set if an error occurs. If no file is found at `path`, then `error` will point to an `NSError` object with ``BAManagedErrorCode/BAManagedErrorCodeFileNotFound`` as its code. - Returns: The file’s contents.
     */
    contentsAtPath$searchingInAssetPackWithIdentifier$options$error$(path: _NSString, assetPackIdentifier: _NSString | null, options: NSDataReadingOptions, error: NobjcObject | null): _NSData | null;
    /**
     * Opens and returns a file descriptor for the asset file at the specified relative path. All asset packs share the same namespace, so you can treat the overall collection of downloaded asset packs as if it were a single root directory that contains all of your subdirectories and asset files, regardless of the specific asset pack in which any particular file resides. If there’s a file-path collision across multiple asset packs, then it’s undefined from which asset pack the file will be opened unless you explicitly limit the search to a particular asset pack by passing a non-`nil` identifier to the `assetPackIdentifier` parameter. A return value of `-1` indicates that an error occurred. - Parameters: - path: The relative file path. - assetPackIdentifier: The identifier of the asset pack in which you want to search for the file or `nil` if you want to search in all asset packs. - error: A pointer to an error that will be set if an error occurs. If no file is found at `path`, then it will point to an `NSError` object with ``BAManagedErrorCode/BAManagedErrorCodeFileNotFound`` as its code. - Returns: A descriptor for the opened file. - Important: It’s your responsibility to close the file descriptor when you’re done using it. - Remark: Use this method if you need low-level access to the file descriptor. If you don’t, then use ``BAAssetPackManager/contentsAtPath:searchingInAssetPackWithIdentifier:options:error:`` instead.
     */
    fileDescriptorForPath$searchingInAssetPackWithIdentifier$error$(path: _NSString, assetPackIdentifier: _NSString | null, error: NobjcObject | null): number;
    /**
     * Returns a URL for the specified relative path. All asset packs share the same namespace, so you can treat the overall collection of downloaded asset packs as if it were a single root directory that contains all of your subdirectories and asset files, regardless of the specific asset pack in which any particular file resides. Unlike ``BAAssetPackManager/contentsAtPath:searchingInAssetPackWithIdentifier:options:error:`` and ``BAAssetPackManager/fileDescriptorForPath:searchingInAssetPackWithIdentifier:error:``, this method supports retrieving entire directories—including packages—in which case it merges the corresponding slices of the shared logical directory from all downloaded asset packs that contain such slices. If there’s a file-path collision across multiple asset packs, then it’s undefined from which asset pack an individual file will be resolved. - Parameters: - path: The relative file path. - error: A pointer to an error that will be set if an error occurs. - Warning: Don’t persist the returned URL beyond the lifetime of the current process. - Warning: This method is less efficient than are ``BAAssetPackManager/contentsAtPath:searchingInAssetPackWithIdentifier:options:error:`` and ``BAAssetPackManager/fileDescriptorForPath:searchingInAssetPackWithIdentifier:error:``; use those methods instead if you can do so. In particular, this method shouldn’t be used to get the URL to the root of the shared asset-pack namespace. Don’t use this method to block the main thread. - Note: This method will return a well formed URL even if no item exists at the specified relative path in any asset pack, in which case any attempts to get its contents—whether it’s a file or a directory—will fail.
     */
    URLForPath$error$(path: _NSString, error: NobjcObject | null): _NSURL | null;
    /**
     * Removes the specified asset pack from the device. - Parameters: - assetPackIdentifier: The asset pack’s identifier. - completionHandler: A block that receives an error if one occurs.
     */
    removeAssetPackWithIdentifier$completionHandler$(assetPackIdentifier: _NSString, completionHandler: ((error: _NSError) => void) | null): void;
    /**
     * An object that receives notifications about events that occur as an asset pack is downloaded.
     */
    delegate(): _BAManagedAssetPackDownloadDelegate | null;
    setDelegate$(value: _BAManagedAssetPackDownloadDelegate | null): void;
}
