//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UITextChecker;

    unsafe impl ClassType for UITextChecker {
        type Super = NSObject;
        type Mutability = MainThreadOnly;
    }
);

unsafe impl NSObjectProtocol for UITextChecker {}

extern_methods!(
    unsafe impl UITextChecker {
        #[method(rangeOfMisspelledWordInString:range:startingAt:wrap:language:)]
        pub unsafe fn rangeOfMisspelledWordInString_range_startingAt_wrap_language(
            &self,
            string_to_check: &NSString,
            range: NSRange,
            starting_offset: NSInteger,
            wrap_flag: bool,
            language: &NSString,
        ) -> NSRange;

        #[method_id(@__retain_semantics Other guessesForWordRange:inString:language:)]
        pub unsafe fn guessesForWordRange_inString_language(
            &self,
            range: NSRange,
            string: &NSString,
            language: &NSString,
        ) -> Option<Retained<NSArray<NSString>>>;

        #[method_id(@__retain_semantics Other completionsForPartialWordRange:inString:language:)]
        pub unsafe fn completionsForPartialWordRange_inString_language(
            &self,
            range: NSRange,
            string: &NSString,
            language: &NSString,
        ) -> Option<Retained<NSArray<NSString>>>;

        #[method(ignoreWord:)]
        pub unsafe fn ignoreWord(&self, word_to_ignore: &NSString);

        #[method_id(@__retain_semantics Other ignoredWords)]
        pub unsafe fn ignoredWords(&self) -> Option<Retained<NSArray<NSString>>>;

        #[method(setIgnoredWords:)]
        pub unsafe fn setIgnoredWords(&self, ignored_words: Option<&NSArray<NSString>>);

        #[method(learnWord:)]
        pub unsafe fn learnWord(word: &NSString, mtm: MainThreadMarker);

        #[method(hasLearnedWord:)]
        pub unsafe fn hasLearnedWord(word: &NSString, mtm: MainThreadMarker) -> bool;

        #[method(unlearnWord:)]
        pub unsafe fn unlearnWord(word: &NSString, mtm: MainThreadMarker);

        #[method_id(@__retain_semantics Other availableLanguages)]
        pub unsafe fn availableLanguages(mtm: MainThreadMarker) -> Retained<NSArray<NSString>>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl UITextChecker {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
    }
);
