import type { NobjcObject } from "objc-js";
import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSDictionary } from "../Foundation/NSDictionary.js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { _NSOrthography } from "../Foundation/NSOrthography.js";
import type { _NSString } from "../Foundation/NSString.js";
import type { _NSTextCheckingResult } from "../Foundation/NSTextCheckingResult.js";
import type { _NSMenu } from "./NSMenu.js";
import type { _NSPanel } from "./NSPanel.js";
import type { _NSTextInputClient } from "./NSTextInputClient.js";
import type { _NSView } from "./NSView.js";
import type { _NSViewController } from "./NSViewController.js";
import type { CGPoint } from "../structs/CGPoint.js";
import type { CGRect } from "../structs/CGRect.js";
import type { NSRange } from "../structs/NSRange.js";
import type { NSCorrectionIndicatorType } from "./NSCorrectionIndicatorType.js";
import type { NSCorrectionResponse } from "./NSCorrectionResponse.js";
export declare class _NSSpellChecker extends _NSObject {
    static alloc(): _NSSpellChecker;
    static new(): _NSSpellChecker;
    init(): _NSSpellChecker;
    /**
     * Returns a guaranteed unique tag to use as the spell document tag for a document. You should use this method to generate tags, if possible, to avoid collisions with other objects that can be spell checked.
     */
    static uniqueSpellDocumentTag(): number;
    /** Only one per application. */
    static sharedSpellChecker(): _NSSpellChecker;
    static sharedSpellCheckerExists(): boolean;
    /**
     * These methods allow clients to determine the global user preference settings for automatic text replacement, spelling correction, quote substitution, dash substitution, autocapitalization, double-space-to-period substitution, text completion, and inline prediction. Text views by default will follow these automatically, but clients may override that by programmatically setting the values on the text view. These methods will be useful for non-text view clients and others who wish to keep track of the settings. Notifications are available (see below) when the settings change.
     */
    static automaticTextReplacementEnabled(): boolean;
    static automaticSpellingCorrectionEnabled(): boolean;
    static automaticQuoteSubstitutionEnabled(): boolean;
    static automaticDashSubstitutionEnabled(): boolean;
    static automaticCapitalizationEnabled(): boolean;
    static automaticPeriodSubstitutionEnabled(): boolean;
    static automaticTextCompletionEnabled(): boolean;
    static automaticInlinePredictionEnabled(): boolean;
    /**
     * Initiates a spell-check of a string. Returns the range of the first misspelled word (and optionally the wordCount by reference).
     */
    checkSpellingOfString$startingAt$language$wrap$inSpellDocumentWithTag$wordCount$(stringToCheck: _NSString, startingOffset: number, language: _NSString | null, wrapFlag: boolean, tag: number, wordCount: NobjcObject | null): NSRange;
    checkSpellingOfString$startingAt$(stringToCheck: _NSString, startingOffset: number): NSRange;
    /**
     * Just counts the words without checking spelling. Returns -1 if counting words isn't supported by the spell server selected.
     */
    countWordsInString$language$(stringToCount: _NSString, language: _NSString | null): number;
    /**
     * Initiates a grammar-check of a string. Returns the range of the first flagged sentence (or similar grammatical unit), and optionally an array of dictionaries describing details within this sentence. Keys in the details dictionaries are described in Foundation/NSSpellServer.h.
     */
    checkGrammarOfString$startingAt$language$wrap$inSpellDocumentWithTag$details$(stringToCheck: _NSString, startingOffset: number, language: _NSString | null, wrapFlag: boolean, tag: number, details: NobjcObject | null): NSRange;
    /**
     * Requests unified text checking for the given range of the given string. The checkingTypes should be a bitmask of checking types from NSTextCheckingResult.h, describing which types of checking are desired. The options dictionary allows clients to pass in options for certain types of checking. The orthography and wordCount arguments will return by reference these two attributes of the range as a whole, while the return value is an array of NSTextCheckingResult objects describing particular items found during checking and their individual ranges, sorted by range origin, then range end, then result type.
     */
    checkString$range$types$options$inSpellDocumentWithTag$orthography$wordCount$(stringToCheck: _NSString, range: NSRange, checkingTypes: number, options: _NSDictionary | null, tag: number, orthography: NobjcObject | null, wordCount: NobjcObject | null): _NSArray;
    /**
     * Requests unified text checking in the background. The return value is a monotonically increasing sequence number that can be used to keep track of requests in flight. The completion handler will be called (in an arbitrary context) when results are available, with the sequence number and results. The arguments and results are otherwise the same as for the previous method.
     */
    requestCheckingOfString$range$types$options$inSpellDocumentWithTag$completionHandler$(stringToCheck: _NSString, range: NSRange, checkingTypes: number, options: _NSDictionary | null, tag: number, completionHandler: ((sequenceNumber: number, results: _NSArray, orthography: _NSOrthography, wordCount: number) => void) | null): number;
    /**
     * Requests candidate generation in the background. The return value is a monotonically increasing sequence number that can be used to keep track of requests in flight. The completion handler will be called (in an arbitrary context) when results are available, with the sequence number and results.
     */
    requestCandidatesForSelectedRange$inString$types$options$inSpellDocumentWithTag$completionHandler$(selectedRange: NSRange, stringToCheck: _NSString, checkingTypes: number, options: _NSDictionary | null, tag: number, completionHandler: ((sequenceNumber: number, candidates: _NSArray) => void) | null): number;
    /**
     * Provides a menu containing contextual menu items suitable for certain kinds of detected results (notably date/time/address results). The options dictionary allows clients to pass in information associated with the document.
     */
    menuForResult$string$options$atLocation$inView$(result: _NSTextCheckingResult, checkedString: _NSString, options: _NSDictionary | null, location: CGPoint, view: _NSView): _NSMenu | null;
    /**
     * Methods for obtaining the default values for NSTextCheckingQuotesKey and NSTextCheckingReplacementsKey.
     */
    userQuotesArrayForLanguage$(language: _NSString): _NSArray;
    /**
     * The checkSpellingOfString:... methods return the range of the misspelled word found. It is up to the client to select that word in their document and to cause the spelling panel to update itself to reflect the found misspelling. Clients should call updateSpellPanelWithMisspelledWord: to inform the spelling panel of the word to be displayed.
     */
    updateSpellingPanelWithMisspelledWord$(word: _NSString): void;
    /**
     * The checkGrammarOfString:... method return the range of the sentence (or equivalent grammatical unit) with grammar issues, and an array of details describing the individual issues. It is up to the client to select one of those details in their document and to cause the spelling panel to update itself to reflect the found issue. Clients should call updateSpellingPanelWithGrammarString:detail: to inform the spelling panel of this. The string should be the entire sentence, i.e., the substring corresponding to the overall range returned by checkGrammarOfString:..., and the detail should be one of the elements of the details array.
     */
    updateSpellingPanelWithGrammarString$detail$(string_: _NSString, detail: _NSDictionary): void;
    /**
     * This method should be called when a client changes some relevant setting, such as what kind of spelling, grammar checking, or substitutions it uses.
     */
    updatePanels(): void;
    /**
     * This method should be called from the client's implementation of -ignoreSpelling:
     */
    ignoreWord$inSpellDocumentWithTag$(wordToIgnore: _NSString, tag: number): void;
    ignoredWordsInSpellDocumentWithTag$(tag: number): _NSArray | null;
    setIgnoredWords$inSpellDocumentWithTag$(words: _NSArray, tag: number): void;
    /**
     * This method returns multiple proposed alternatives for a given word, whether it is misspelled or not, in the order in which they should be presented.
     */
    guessesForWordRange$inString$language$inSpellDocumentWithTag$(range: NSRange, string_: _NSString, language: _NSString | null, tag: number): _NSArray | null;
    /**
     * If a word is misspelled, this will return a single proposed correction, if one is available. Correction functionality is available starting in 10.6 as part of unified text checking, but for convenience this method makes it available separately starting in 10.7.
     */
    correctionForWordRange$inString$language$inSpellDocumentWithTag$(range: NSRange, string_: _NSString, language: _NSString, tag: number): _NSString | null;
    /**
     * Returns an array of strings, in the order in which they should be presented, representing complete words that the user might be trying to type when starting by typing the partial word at the given range in the given string.
     */
    completionsForPartialWordRange$inString$language$inSpellDocumentWithTag$(range: NSRange, string_: _NSString, language: _NSString | null, tag: number): _NSArray | null;
    /**
     * Clients who have an NSOrthography from NSTextCheckingTypeOrthography checking and wish to determine a specific language from it for a particular word, for example to pass in to -guessesForWordRange:inString:language:inSpellDocumentWithTag:, -correctionForWordRange:inString:language:inSpellDocumentWithTag:, or -completionsForPartialWordRange:inString:language:inSpellDocumentWithTag:, should use this method to obtain it.
     */
    languageForWordRange$inString$orthography$(range: NSRange, string_: _NSString, orthography: _NSOrthography | null): _NSString | null;
    /**
     * When a document closes, it should notify the NSSpellChecker via closeSpellDocumentWithTag: so that any associated data such as its ignored word list can be cleaned up.
     */
    closeSpellDocumentWithTag$(tag: number): void;
    recordResponse$toCorrection$forWord$language$inSpellDocumentWithTag$(response: NSCorrectionResponse, correction: _NSString, word: _NSString, language: _NSString | null, tag: number): void;
    showCorrectionIndicatorOfType$primaryString$alternativeStrings$forStringInRect$view$completionHandler$(type: NSCorrectionIndicatorType, primaryString: _NSString, alternativeStrings: _NSArray, rectOfTypedString: CGRect, view: _NSView, completionBlock: ((arg0: _NSString) => void) | null): void;
    dismissCorrectionIndicatorForView$(view: _NSView): void;
    /**
     * Clients may use this to cause inline prediction candidates to be shown. The candidates passed in should come from calling requestCandidates with the NSTextCheckingGenerateInlinePredictionsKey option set. The inline prediction (if any) will be sent to the client for display using NSTextInputClient methods.
     */
    showInlinePredictionForCandidates$client$(candidates: _NSArray, client: _NSTextInputClient): void;
    /**
     * In some cases the next typing should prevent a pending correction (if it is an @, for example). This method allows clients to recognize these cases in a standardized way.
     */
    preventsAutocorrectionBeforeString$language$(string_: _NSString, language: _NSString | null): boolean;
    /**
     * In some cases the space automatically inserted after an accepted candidate should be deleted when the next text is typed (e.g. if it is a period or comma). This method allows clients to recognize these cases in a standardized way.
     */
    deletesAutospaceBetweenString$andString$language$(precedingString: _NSString, followingString: _NSString, language: _NSString | null): boolean;
    /** Allows programmatic setting of the misspelled word field. */
    setWordFieldStringValue$(string_: _NSString): void;
    /**
     * These allow clients to programmatically instruct the spellchecker to learn and unlearn words, and to determine whether a word has been learned (and hence can potentially be unlearned).
     */
    learnWord$(word: _NSString): void;
    hasLearnedWord$(word: _NSString): boolean;
    unlearnWord$(word: _NSString): void;
    /**
     * Use of the following methods is discouraged; ordinarily language identification should be allowed to take place automatically, or else a specific language should be passed in to the methods that take such an argument, if the language is known in advance. -setLanguage: allows programmatic setting of the language to spell-check in, for compatibility use if other methods are called with no language specified. -setLanguage: accepts any of the language formats used by NSBundle, and tries to find the closest match among the available languages. If -setLanguage: has been called, then -language will return that match; otherwise, it will return Multilingual if there is more than one element in -userPreferredLanguages, or the one element in that array if there is only one.
     */
    language(): _NSString;
    setLanguage$(language: _NSString): boolean;
    /**
     * @deprecated Use -guessesForWordRange:inString:language:inSpellDocumentWithTag instead
     */
    guessesForWord$(word: _NSString): _NSArray;
    /** @deprecated unlearnWord: */
    forgetWord$(word: _NSString): void;
    userReplacementsDictionary(): _NSDictionary;
    /** Set and get attributes of the spelling and grammar panel. */
    spellingPanel(): _NSPanel;
    accessoryView(): _NSView | null;
    setAccessoryView$(value: _NSView | null): void;
    /** Set and get attributes of the substitutions panel. */
    substitutionsPanel(): _NSPanel;
    substitutionsPanelAccessoryViewController(): _NSViewController;
    setSubstitutionsPanelAccessoryViewController$(value: _NSViewController): void;
    /**
     * Entries in the availableLanguages list are all available spellchecking languages in user preference order, as described in the spellchecker's info dictionary, usually language abbreviations such as en_US. The userPreferredLanguages will be a subset of the availableLanguages, as selected by the user for use with spellchecking, in preference order. If automaticallyIdentifiesLanguages is YES, then text checking will automatically use these as appropriate; otherwise, it will use the language set by setLanguage:. The older checkSpellingOfString:... and checkGrammarOfString:... methods will use the language set by setLanguage:, if they are called with a nil language argument.
     */
    availableLanguages(): _NSArray;
    userPreferredLanguages(): _NSArray;
    automaticallyIdentifiesLanguages(): boolean;
    setAutomaticallyIdentifiesLanguages$(value: boolean): void;
}
