import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSData } from "../Foundation/NSData.js";
import type { _NSError } from "../Foundation/NSError.js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { _NSString } from "../Foundation/NSString.js";
import type { _UTType } from "../UniformTypeIdentifiers/UTType.js";
import type { _CSIndexExtensionRequestHandler } from "./CSIndexExtensionRequestHandler.js";
import type { _CSSearchableIndexDelegate } from "./CSSearchableIndexDelegate.js";
import type { NSFileProtectionType } from "../Foundation/NSFileProtectionType.js";
export declare class _CSSearchableIndex extends _NSObject {
    static alloc(): _CSSearchableIndex;
    static new(): _CSSearchableIndex;
    init(): _CSSearchableIndex;
    /**
     * Not all devices support indexing. Call this method to check if indexing is supported on the current device.
     */
    static isIndexingAvailable(): boolean;
    static defaultSearchableIndex(): _CSSearchableIndex;
    /**
     * Apps can set a name for the index instance. This name is used as a handle for the client state used with the batch API, allowing a single client to have multiple client states; you have to retrieve the client state for an index instance with the same name as you used when setting the client state.
     */
    initWithName$(name: _NSString): _CSSearchableIndex;
    /**
     * Apps can set a default protection class for items in their entitlements. You can alternately create an instance with a custom protection class to use on iOS. It should be one of NSFileProtectionComplete, NSFileProtectionCompleteUnlessOpen, or NSFileProtectionCompleteUntilFirstUserAuthentication.
     */
    initWithName$protectionClass$(name: _NSString, protectionClass: NSFileProtectionType | null): _CSSearchableIndex;
    /**
     * Call this method to add or update items in the index. Completion handlers will be called once the data has been journaled by the index. If the completion handler returns an error, the client should retry, as it was not journaled correctly. reindexSearchableItemsWithIdentifiers will be called if the journaling completed successfully but the data was not able to be indexed for some reason.
     */
    indexSearchableItems$completionHandler$(items: _NSArray, completionHandler: ((error: _NSError) => void) | null): void;
    /**
     * Call this method to remove items with the given identifiers from the index. Completion handlers will be called once the data has been journaled by the index. If the completion handler returns an error, the client should retry, as it was not journaled correctly. reindexSearchableItemsWithIdentifiers will be called if the journaling completed successfully but the data was not able to be indexed for some reason.
     */
    deleteSearchableItemsWithIdentifiers$completionHandler$(identifiers: _NSArray, completionHandler: ((error: _NSError) => void) | null): void;
    /**
     * Call this method on the index to remove any items from the index with the given domain identifiers. The delete is recursive so if domain identifiers are of the form <account -id>. <mailbox -id>, for example, calling delete with <account -id> will delete all the searchable items with that account and any mailbox.
     */
    deleteSearchableItemsWithDomainIdentifiers$completionHandler$(domainIdentifiers: _NSArray, completionHandler: ((error: _NSError) => void) | null): void;
    /** Call this method to delete all searchable items from the index. */
    deleteAllSearchableItemsWithCompletionHandler$(completionHandler: ((error: _NSError) => void) | null): void;
    /** Begin a batch of index adds, updates, or deletes. */
    beginIndexBatch(): void;
    /**
     * End a batch passing in expected client state information to be persisted in the index, along with new client state for the current batch. The completion handler will be called once the client state has been persisted. If the client state does not match expected, an error of CSIndexErrorCodeMismatchedClientState will be returned.
     */
    endIndexBatchWithExpectedClientState$newClientState$completionHandler$(expectedClientState: _NSData | null, newClientState: _NSData, completionHandler: ((error: _NSError) => void) | null): void;
    /**
     * End a batch passing in client state information to be persisted in the index. The completion handler will be called once the client state has been persisted.
     */
    endIndexBatchWithClientState$completionHandler$(clientState: _NSData, completionHandler: ((error: _NSError) => void) | null): void;
    /** Async fetches the app's last stored client state information. */
    fetchLastClientStateWithCompletionHandler$(completionHandler: ((clientState: _NSData, error: _NSError) => void) | null): void;
    fetchDataForBundleIdentifier$itemIdentifier$contentType$completionHandler$(bundleIdentifier: _NSString, itemIdentifier: _NSString, contentType: _UTType, completionHandler: ((arg0: _NSData, arg1: _NSError) => void) | null): void;
    indexDelegate(): _CSIndexExtensionRequestHandler | null;
    setIndexDelegate$(value: _CSSearchableIndexDelegate | null): void;
}
