import type { NobjcObject } from "objc-js";
import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSDictionary } from "../Foundation/NSDictionary.js";
import type { _NSError } from "../Foundation/NSError.js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { _NSString } from "../Foundation/NSString.js";
import type { _NSURL } from "../Foundation/NSURL.js";
import type { _NSManagedObjectContext } from "./NSManagedObjectContext.js";
import type { _NSManagedObjectID } from "./NSManagedObjectID.js";
import type { _NSManagedObjectModel } from "./NSManagedObjectModel.js";
import type { _NSPersistentHistoryToken } from "./NSPersistentHistoryToken.js";
import type { _NSPersistentStore } from "./NSPersistentStore.js";
import type { _NSPersistentStoreDescription } from "./NSPersistentStoreDescription.js";
import type { _NSPersistentStoreRequest } from "./NSPersistentStoreRequest.js";
export declare class _NSPersistentStoreCoordinator extends _NSObject {
    static alloc(): _NSPersistentStoreCoordinator;
    static new(): _NSPersistentStoreCoordinator;
    init(): _NSPersistentStoreCoordinator;
    /**
     * Registers the specified NSPersistentStore subclass for the specified store type string. This method must be invoked before a custom subclass of NSPersistentStore can be loaded into a persistent store coordinator. Passing nil for the store class argument will unregister the specified store type.
     */
    static registerStoreClass$forStoreType$(storeClass: NobjcObject | null, storeType: _NSString): void;
    /**
     * Allows to access the metadata stored in a persistent store without warming up a CoreData stack; the guaranteed keys in this dictionary are NSStoreTypeKey and NSStoreUUIDKey. If storeType is nil, Core Data will guess which store class should be used to get/set the store file's metadata.
     */
    static metadataForPersistentStoreOfType$URL$options$error$(storeType: _NSString, url: _NSURL, options: _NSDictionary | null, error: NobjcObject | null): _NSDictionary | null;
    static setMetadata$forPersistentStoreOfType$URL$options$error$(metadata: _NSDictionary | null, storeType: _NSString, url: _NSURL, options: _NSDictionary | null, error: NobjcObject | null): boolean;
    /**
     * Takes a URL to an external record file file and returns a dictionary with the derived elements The keys in the dictionary are NSEntityNameInPathKey - the name of the entity for the managed object instance NSStoreUUIDInPathKey - UUID of the store containing the instance NSStorePathKey - path to the store file (this is resolved to the store-file path contained in the support directory) NSModelPathKey - path to the model file (this is resolved to the model.mom path contained in the support directory) NSObjectURIKey - URI of the object instance.
     * @deprecated Spotlight integration is deprecated. Use CoreSpotlight integration instead.
     */
    static elementsDerivedFromExternalRecordURL$(fileURL: _NSURL): _NSDictionary;
    /**
     * DEPRECATED
     * @deprecated Use -metadataForPersistentStoreOfType:URL:options:error: and pass in an options dictionary matching addPersistentStoreWithType
     */
    static metadataForPersistentStoreWithURL$error$(url: _NSURL, error: NobjcObject | null): _NSDictionary | null;
    /**
     * @deprecated Use -metadataForPersistentStoreOfType:URL:options:error: and pass in an options dictionary matching addPersistentStoreWithType
     */
    static metadataForPersistentStoreOfType$URL$error$(storeType: _NSString | null, url: _NSURL, error: NobjcObject | null): _NSDictionary | null;
    /**
     * @deprecated Use  -setMetadata:forPersistentStoreOfType:URL:options:error: and pass in an options dictionary matching addPersistentStoreWithType
     */
    static setMetadata$forPersistentStoreOfType$URL$error$(metadata: _NSDictionary | null, storeType: _NSString | null, url: _NSURL, error: NobjcObject | null): boolean;
    /**
     * Delete all ubiquitous content for all peers for the persistent store at the given URL and also delete the local store file. storeOptions should contain the options normally passed to addPersistentStoreWithType:URL:options:error. Errors may be returned as a result of file I/O, iCloud network or iCloud account issues.
     * @deprecated Please see the release notes and Core Data documentation.
     */
    static removeUbiquitousContentAndPersistentStoreAtURL$options$error$(storeURL: _NSURL, options: _NSDictionary | null, error: NobjcObject | null): boolean;
    /**
     * Returns a dictionary of the registered store types: the keys are the store type strings and the values are the NSPersistentStore subclasses wrapped in NSValues.
     */
    static registeredStoreTypes(): _NSDictionary;
    initWithManagedObjectModel$(model: _NSManagedObjectModel): _NSPersistentStoreCoordinator;
    persistentStoreForURL$(URL: _NSURL): _NSPersistentStore | null;
    URLForPersistentStore$(store: _NSPersistentStore): _NSURL;
    /**
     * Sets the URL for the specified store in the coordinator. For atomic stores, this will alter the location to which the next save operation will persist the file; for non-atomic stores, invoking this method will release the existing connection and create a new one at the specified URL. (For non-atomic stores, a store must pre-exist at the destination URL; a new store will not be created.)
     */
    setURL$forPersistentStore$(url: _NSURL, store: _NSPersistentStore): boolean;
    /**
     * Adds the store at the specified URL (of the specified type) to the coordinator with the model configuration and options. The configuration can be nil -- then it's the complete model; storeURL is usually the file location of the database
     */
    addPersistentStoreWithType$configuration$URL$options$error$(storeType: _NSString, configuration: _NSString | null, storeURL: _NSURL | null, options: _NSDictionary | null, error: NobjcObject | null): _NSPersistentStore | null;
    addPersistentStoreWithDescription$completionHandler$(storeDescription: _NSPersistentStoreDescription, block: ((arg0: _NSPersistentStoreDescription, arg1: _NSError) => void) | null): void;
    removePersistentStore$error$(store: _NSPersistentStore, error: NobjcObject | null): boolean;
    /**
     * Sets the metadata stored in the persistent store during the next save operation executed on it; the store type and UUID (NSStoreTypeKey and NSStoreUUIDKey) are always added automatically (but NSStoreUUIDKey is only added if it is not set manually as part of the dictionary argument)
     */
    setMetadata$forPersistentStore$(metadata: _NSDictionary | null, store: _NSPersistentStore): void;
    /** Returns the metadata currently stored or to-be-stored in the persistent store */
    metadataForPersistentStore$(store: _NSPersistentStore): _NSDictionary;
    /**
     * Given a URI representation of an object ID, returns an object ID if a matching store is available or nil if a matching store cannot be found (the URI representation contains a UUID of the store the ID is coming from, and the coordinator can match it against the stores added to it)
     */
    managedObjectIDForURIRepresentation$(url: _NSURL): _NSManagedObjectID | null;
    /**
     * Sends a request to all of the stores associated with this coordinator. Returns an array if successful, nil if not. The contents of the array will vary depending on the request type: NSFetchRequest results will be an array of managed objects, managed object IDs, or NSDictionaries; NSSaveChangesRequests will an empty array. User defined requests will return arrays of arrays, where the nested array is the result returned form a single store.
     */
    executeRequest$withContext$error$(request: _NSPersistentStoreRequest, context: _NSManagedObjectContext, error: NobjcObject | null): NobjcObject | null;
    /**
     * Creates and populates a store with the external records found at externalRecordsURL. The store is written to destinationURL using options and with type storeType. If storeIdentifier is nil, the records for a single store at externalRecordsURL at imported. externalRecordsURL must not exist as the store will be created from scratch (no appending to an existing store is allowed).
     * @deprecated Spotlight integration is deprecated. Use CoreSpotlight integration instead.
     */
    importStoreWithIdentifier$fromExternalRecordsDirectory$toURL$options$withType$error$(storeIdentifier: _NSString | null, externalRecordsURL: _NSURL, destinationURL: _NSURL, options: _NSDictionary | null, storeType: _NSString, error: NobjcObject | null): _NSPersistentStore | null;
    /**
     * Used for save as - performance may vary depending on the type of old and new store; the old store is usually removed from the coordinator by the migration operation, and therefore is no longer a useful reference after invoking this method
     */
    migratePersistentStore$toURL$options$withType$error$(store: _NSPersistentStore, URL: _NSURL, options: _NSDictionary | null, storeType: _NSString, error: NobjcObject | null): _NSPersistentStore | null;
    /**
     * delete or truncate the target persistent store in accordance with the store class's requirements. It is important to pass similar options as addPersistentStoreWithType: ... SQLite stores will honor file locks, journal files, journaling modes, and other intricacies. It is not possible to unlink a database file safely out from underneath another thread or process, so this API performs a truncation. Other stores will default to using NSFileManager.
     */
    destroyPersistentStoreAtURL$withType$options$error$(url: _NSURL, storeType: _NSString, options: _NSDictionary | null, error: NobjcObject | null): boolean;
    /**
     * copy or overwrite the target persistent store in accordance with the store class's requirements. It is important to pass similar options as addPersistentStoreWithType: ... SQLite stores will honor file locks, journal files, journaling modes, and other intricacies. Other stores will default to using NSFileManager.
     */
    replacePersistentStoreAtURL$destinationOptions$withPersistentStoreFromURL$sourceOptions$storeType$error$(destinationURL: _NSURL, destinationOptions: _NSDictionary | null, sourceURL: _NSURL, sourceOptions: _NSDictionary | null, storeType: _NSString, error: NobjcObject | null): boolean;
    /**
     * asynchronously performs the block on the coordinator's queue. Encapsulates an autorelease pool.
     */
    performBlock$(block: () => void): void;
    /**
     * synchronously performs the block on the coordinator's queue. May safely be called reentrantly. Encapsulates an autorelease pool.
     */
    performBlockAndWait$(block: () => void): void;
    /**
     * Constructs a combined NSPersistentHistoryToken given an array of persistent stores. If stores is nil or an empty array, the NSPersistentHistoryToken will be constructed with all of the persistent stores in the coordinator.
     */
    currentPersistentHistoryTokenFromStores$(stores: _NSArray | null): _NSPersistentHistoryToken | null;
    /** Finish deferred work from lightweight migration */
    finishDeferredLightweightMigration$(error: NobjcObject | null): boolean;
    /** Finish deferred work from lightweight migration for a single table */
    finishDeferredLightweightMigrationTask$(error: NobjcObject | null): boolean;
    managedObjectIDFromUTF8String$length$(utf8string: string, len: number): _NSManagedObjectID;
    /** @deprecated Use -performBlockAndWait: instead */
    lock(): void;
    /** @deprecated Use -performBlockAndWait: instead */
    unlock(): void;
    /** @deprecated Use -performBlock: instead */
    tryLock(): boolean;
    managedObjectModel(): _NSManagedObjectModel;
    persistentStores(): _NSArray;
    /** custom name for a coordinator. Coordinators will set the label on their queue */
    name(): _NSString | null;
    setName$(value: _NSString | null): void;
}
