import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSCoder } from "../Foundation/NSCoder.js";
import type { _NSError } from "../Foundation/NSError.js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { _NSTextContentManagerDelegate } from "./NSTextContentManagerDelegate.js";
import type { _NSTextElementProvider } from "./NSTextElementProvider.js";
import type { _NSTextLayoutManager } from "./NSTextLayoutManager.js";
import type { _NSTextRange } from "./NSTextRange.js";
export declare class _NSTextContentManager extends _NSObject {
    static alloc(): _NSTextContentManager;
    static new(): _NSTextContentManager;
    init(): _NSTextContentManager;
    initWithCoder$(coder: _NSCoder): _NSTextContentManager | null;
    addTextLayoutManager$(textLayoutManager: _NSTextLayoutManager): void;
    removeTextLayoutManager$(textLayoutManager: _NSTextLayoutManager): void;
    /**
     * Synchronizes changes to all non-primary text layout managers. If completionHandler=nil, performs the operation synchronously. completionHandler gets passed error if failed. It should block (or fail if synchronous) when there is an active transaction.
     */
    synchronizeTextLayoutManagers$(completionHandler: ((error: _NSError) => void) | null): void;
    /**
     * Returns an array of NSTextElement intersecting the specified range in sequence. It can return a set of elements not filling the entire range specified if the entire range is not synchronously available. Uses -enumerateTextElementsFromLocation:options:usingBlock: to fill the array.
     */
    textElementsForRange$(range: _NSTextRange): _NSArray;
    /**
     * Invoked by primaryTextLayoutManager controlling the active editing transaction. Can be nested. The outer most transaction toggles hasEditingTransaction and sends synchronization messages if enabled after invoking transaction.
     */
    performEditingTransactionUsingBlock$(transaction: () => void): void;
    /**
     * Records information about an edit action to the transaction. originalTextRange is the range edited before the action, and newTextRange is the corresponding range after the action. The concrete subclass should invoke this method for each edit action.
     */
    recordEditActionInRange$newTextRange$(originalTextRange: _NSTextRange, newTextRange: _NSTextRange): void;
    delegate(): _NSTextContentManagerDelegate | null;
    setDelegate$(value: _NSTextContentManagerDelegate | null): void;
    /** An array of NSTextLayoutManager. KVO-compliant */
    textLayoutManagers(): _NSArray;
    /**
     * The primary NSTextLayoutManager interacting with the user allowing to edit. Setting an NSTextLayoutManager not in textLayoutManagers will reset to nil. It automatically synchronizes pending edits before switching to a new primary object. The operation is synchronous. KVO-compliant
     */
    primaryTextLayoutManager(): _NSTextLayoutManager | null;
    setPrimaryTextLayoutManager$(value: _NSTextLayoutManager | null): void;
    /**
     * When YES, there is an active editing transaction from primaryTextLayoutManager. the synchronization operations to non-primary text layout managers and the backing store block (or fails when synchronous) while this property is YES. Non-primary text layout managers should avoid accessing the elements while this is YES. KVO-compliant
     */
    hasEditingTransaction(): boolean;
    /**
     * Automatically synchronizes all text layout managers when hasEditingTransaction becoming NO. YES by default.
     */
    automaticallySynchronizesTextLayoutManagers(): boolean;
    setAutomaticallySynchronizesTextLayoutManagers$(value: boolean): void;
    /**
     * Automatically synchronizes the backing store when hasEditingTransaction becoming NO. NO by default.
     */
    automaticallySynchronizesToBackingStore(): boolean;
    setAutomaticallySynchronizesToBackingStore$(value: boolean): void;
}
export interface _NSTextContentManager extends _NSTextElementProvider {
}
