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

use crate::*;

extern "C" {
    #[cfg(feature = "NSString")]
    pub static NSOperationNotSupportedForKeyException: &'static NSString;
}

extern_category!(
    /// Category "NSScriptKeyValueCoding" on [`NSObject`].
    #[doc(alias = "NSScriptKeyValueCoding")]
    pub unsafe trait NSObjectNSScriptKeyValueCoding {
        #[cfg(feature = "NSString")]
        #[method_id(@__retain_semantics Other valueAtIndex:inPropertyWithKey:)]
        unsafe fn valueAtIndex_inPropertyWithKey(
            &self,
            index: NSUInteger,
            key: &NSString,
        ) -> Option<Retained<AnyObject>>;

        #[cfg(feature = "NSString")]
        #[method_id(@__retain_semantics Other valueWithName:inPropertyWithKey:)]
        unsafe fn valueWithName_inPropertyWithKey(
            &self,
            name: &NSString,
            key: &NSString,
        ) -> Option<Retained<AnyObject>>;

        #[cfg(feature = "NSString")]
        #[method_id(@__retain_semantics Other valueWithUniqueID:inPropertyWithKey:)]
        unsafe fn valueWithUniqueID_inPropertyWithKey(
            &self,
            unique_id: &AnyObject,
            key: &NSString,
        ) -> Option<Retained<AnyObject>>;

        #[cfg(feature = "NSString")]
        #[method(insertValue:atIndex:inPropertyWithKey:)]
        unsafe fn insertValue_atIndex_inPropertyWithKey(
            &self,
            value: &AnyObject,
            index: NSUInteger,
            key: &NSString,
        );

        #[cfg(feature = "NSString")]
        #[method(removeValueAtIndex:fromPropertyWithKey:)]
        unsafe fn removeValueAtIndex_fromPropertyWithKey(&self, index: NSUInteger, key: &NSString);

        #[cfg(feature = "NSString")]
        #[method(replaceValueAtIndex:inPropertyWithKey:withValue:)]
        unsafe fn replaceValueAtIndex_inPropertyWithKey_withValue(
            &self,
            index: NSUInteger,
            key: &NSString,
            value: &AnyObject,
        );

        #[cfg(feature = "NSString")]
        #[method(insertValue:inPropertyWithKey:)]
        unsafe fn insertValue_inPropertyWithKey(&self, value: &AnyObject, key: &NSString);

        #[cfg(feature = "NSString")]
        #[method_id(@__retain_semantics Other coerceValue:forKey:)]
        unsafe fn coerceValue_forKey(
            &self,
            value: Option<&AnyObject>,
            key: &NSString,
        ) -> Option<Retained<AnyObject>>;
    }

    unsafe impl NSObjectNSScriptKeyValueCoding for NSObject {}
);
